From owner-cvs-src@FreeBSD.ORG Fri Oct 21 16:05:54 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A077E16A41F; Fri, 21 Oct 2005 16:05:54 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CB8843D49; Fri, 21 Oct 2005 16:05:54 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id 71E69BC7A; Fri, 21 Oct 2005 16:05:50 +0000 (UTC) To: Bruce Evans From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 22 Oct 2005 01:45:47 +1000." <20051022011020.T5554@delplex.bde.org> Date: Fri, 21 Oct 2005 18:05:50 +0200 Message-ID: <30805.1129910750@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, Andre Oppermann , cvs-all@FreeBSD.org Subject: Re: Timekeeping [Was: Re: cvs commit: src/usr.bin/vmstat vmstat.c src/usr.bin/w w.c] X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2005 16:05:54 -0000 In message <20051022011020.T5554@delplex.bde.org>, Bruce Evans writes: >How do you resync laptops after suspending them for long enough for >the clock to drift? Use ntpd and let it step, or use ntpd -x and let >it take hours to resync? The right thing to do is step the clocks to >the current time immediately so that they are correct while the system >is actually being used. Ahh, and now we get into interesting territory: What _is_ the definition of uptime for a laptop which has been suspended ? No matter which way you turn, there are dragons... >> But have resigned ourselves to not caring about the actual length >> of seconds and therefore, presumably, having no serious interest >> in timekeeping quality. > >I certainly care about errors of 1 microsecond (although I don't need >to), and just remembered that I use stepping to fix up the clock after >sitting in ddb with the clock stopped. This reduces the error in the >real time clock to ~1 microsecond per second stopped, but gives an error >of 1 second per second stopped in the monotonic time and the boot time. >Here the correct treatment is to jump the monotonic time forward and >not touch the boot time. Again, if you have been sitting in DDB, what exactly is the definition of "uptime" ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.