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 someone sets the clock back 10 minutes while I'm
> asleep (using settimeofday(), not adjtime()).  When select() returns
> I find that I'm 10 minutes late!
> My question is:
>       How can I arrange to be notified when someone and makes a
>       corse change to the system clock?

This may be more work than you want to do, but ...

You could add a new kqueue event which is generated when the system
time is stepped.  Then you could do your sleeping with kevent().

  John Polstra                                               [EMAIL PROTECTED]
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Disappointment is a good sign of basic intelligence."  -- Chögyam Trungpa

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to