Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jul 2004 16:43:02 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        bde@zeta.org.au
Cc:        current@freebsd.org
Subject:   Re: nanosleep returning early
Message-ID:  <20040724.164302.106549556.imp@bsdimp.com>
In-Reply-To: <20040721220405.Y2346@epsplex.bde.org>
References:  <20040721081310.GJ22160@freebsd3.cimlogic.com.au> <20040721102620.GF1009@green.homeunix.org> <20040721220405.Y2346@epsplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20040721220405.Y2346@epsplex.bde.org>
            Bruce Evans <bde@zeta.org.au> writes:
: The monotonic clock can also be adjusted by NTP, and normally is if there
: are any NTP adjustments at all (the uptime and the time use the same
: timecounter which is adjusted by NTP).  NTP's adjustments are only limited
: to CLOCK_REALTIME when NTP steps the clock for initialization.  Stepping
: the clock causes other time warps and should never be used.

ntp's frequency adjustments are applied to both, for the reasons you
state.  ntp's phase adjustments are done only to the 'boottime' which
is adjusted, from time to time, and added to the uptime to get the
current time.  uptime is what is returned by CLOCK_MONOTONIC.

ntp's frequency adjustments are tiny and are designed so that one SI
second really takes one second, not 1+-epsiolon seconds that the
timing hardware may have believed it actually took.

Warner



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