cvs commit: src/sys/kern
Matthew Dillon
dillon at crater.dragonflybsd.org
Sat Dec 4 12:40:19 PST 2004
dillon 2004/12/04 12:38:46 PST
DragonFly src repository
Modified files:
sys/kern kern_clock.c
Log:
Fix the boottime calculation when the time of day is set in absolute terms.
We want boottime to be calculated based on the current real time minus our
best uptime guess. gd_time_seconds survives a lot of time issues and is our
best uptime guess and since it is already used to calculate the new basetime,
we can just assign boottime to basetime.
Note that boottime is not defined quite the same way as basetime. The
system's internal timebase is not compensated for drift or ever jumped,
and is guarenteed to be monotonically increasing. Drift compensation is
accomplished by adjusting basetime, so basetime will always slowly diverge
from boottime if e.g. ntpd is running.
Submitted-by: Paul Herman <pherman at xxxxxxxxxxxxxxx>
Revision Changes Path
1.28 +14 -1 src/sys/kern/kern_clock.c
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_clock.c.diff?r1=1.27&r2=1.28&f=u
More information about the Commits
mailing list