Re: nanosleep returning early

From: Brian Fundakowski Feldman <green_at_freebsd.org>
Date: Wed, 21 Jul 2004 06:26:20 -0400
On Wed, Jul 21, 2004 at 06:13:10PM +1000, John Birrell wrote:
> 
> Today I increased HZ in a current kernel to 1000 when adding dummynet.
> Now I find that nanosleep regularly comes back a little early.
> Can anyone explain why?
> 
> I would have expected that the *overrun* beyond the required time to vary,
> but never that it would come back early.

Is this a difference from clock_gettime(CLOCK_MONOTONIC)?  You really
shouldn't be using gettimeofday() foor internal timing since the
system clock can be adjusted by NTP.

-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green_at_FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\
Received on Wed Jul 21 2004 - 08:26:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:02 UTC