Re: catching abrupt time changes

2001-05-17 Thread John Polstra
In article <[EMAIL PROTECTED]>, Brad Huntting <[EMAIL PROTECTED]> wrote: > > Suppose I'm a (root) process: I have an appointment in exactly > one hour. I call select() and specify a timeout of 3600 seconds, > trusting that the system will wake me up just in time. But > unbeknownst to me someo

Re: catching abrupt time changes

2001-05-17 Thread Brad Huntting
> The usual platform-independent way to do this is to have a thread > that monitors the system clock. It wakes up every, say, 2 seconds > and makes sure the clock is where it expects it. If the clock isn't > what it expects, it does whatever you need to do in that case. > I fear, however, that t

catching abrupt time changes

2001-05-17 Thread Brad Huntting
Suppose I'm a (root) process: I have an appointment in exactly one hour. I call select() and specify a timeout of 3600 seconds, trusting that the system will wake me up just in time. But unbeknownst to me someone sets the clock back 10 minutes while I'm asleep (using settimeofday(), not adjtim