From owner-freebsd-current Thu May 17 15:14:12 2001 Delivered-To: freebsd-current@freebsd.org Received: from hunkular.glarp.com (hunkular.glarp.com [199.117.25.251]) by hub.freebsd.org (Postfix) with ESMTP id 9EF4037B424 for ; Thu, 17 May 2001 15:14:07 -0700 (PDT) (envelope-from huntting@hunkular.glarp.com) Received: from hunkular.glarp.com (localhost [127.0.0.1]) by hunkular.glarp.com (8.11.3/8.11.3) with ESMTP id f4HME2R72919; Thu, 17 May 2001 16:14:04 -0600 (MDT) (envelope-from huntting@hunkular.glarp.com) Message-Id: <200105172214.f4HME2R72919@hunkular.glarp.com> To: "David Schwartz" Cc: "Brad Huntting" , current@FreeBSD.ORG Subject: Re: catching abrupt time changes In-Reply-To: Your message of "Thu, 17 May 2001 09:06:09 PDT." Date: Thu, 17 May 2001 16:14:02 -0600 From: Brad Huntting Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: X-Loop: FreeBSD.ORG > The usual platform-independent way to do this is to have a thread > that monitors the system clock. It wakes up every, say, 2 seconds > and makes sure the clock is where it expects it. If the clock isn't > what it expects, it does whatever you need to do in that case. > I fear, however, that this is yet another technique that won't work > properly with user-space threading. I fear that the clock thread's > sleep function will be virtualize into something that won't sleep > for the right amount of time if the system clock is changed. Does > anyone know which sleep function to use to avoid this - or if there > is one? Unfortunately, this is exactly what I'm trying fix. I want cron to _stop_ waking up every 60 seconds. If cron has nothing to do for 5 days, it should sleep for 5 days. And if everything on the system is sleeping for 5 days and the kernel knows this, then mabey we can hibernate the system for 5 days. I know theres allot more to this than just cron (network stuff etc). brad To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message