Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jul 2004 06:26:20 -0400
From:      Brian Fundakowski Feldman <green@freebsd.org>
To:        John Birrell <jb@cimlogic.com.au>
Cc:        current@freebsd.org
Subject:   Re: nanosleep returning early
Message-ID:  <20040721102620.GF1009@green.homeunix.org>
In-Reply-To: <20040721081310.GJ22160@freebsd3.cimlogic.com.au>
References:  <20040721081310.GJ22160@freebsd3.cimlogic.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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@FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040721102620.GF1009>