From owner-cvs-src-old@FreeBSD.ORG Thu Aug 12 17:17:18 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EA8E1065672 for ; Thu, 12 Aug 2010 17:17:18 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6DC878FC15 for ; Thu, 12 Aug 2010 17:17:18 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o7CHHIF8082506 for ; Thu, 12 Aug 2010 17:17:18 GMT (envelope-from jkim@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o7CHHIZK082505 for cvs-src-old@freebsd.org; Thu, 12 Aug 2010 17:17:18 GMT (envelope-from jkim@repoman.freebsd.org) Message-Id: <201008121717.o7CHHIZK082505@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jkim@repoman.freebsd.org using -f From: Jung-uk Kim Date: Thu, 12 Aug 2010 17:17:05 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern subr_rtc.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Aug 2010 17:17:18 -0000 jkim 2010-08-12 17:17:05 UTC FreeBSD src repository Modified files: sys/kern subr_rtc.c Log: SVN rev 211230 on 2010-08-12 17:17:05Z by jkim Add the half of time-of-day clock resolution when we adjust system time from time-of-day clock or vice versa. For x86 systems, RTC resolution is one second and we used to lose up to one second whenever we initialize system time from RTC or write system time back to RTC. With this change, margin of error per conversion is roughly between -0.5 and +0.5 second rather than between -1 and 0 second. Note that it does not take care of errors from getnanotime(9) (which is up to 1/hz second) or CLOCK_GETTIME() latency. These are just too expensive to correct and it is not worthy of the cost. Revision Changes Path 1.14 +7 -1 src/sys/kern/subr_rtc.c