From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 26 15:53:54 2010 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6506A106566B for ; Fri, 26 Mar 2010 15:53:54 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id AA0558FC0A for ; Fri, 26 Mar 2010 15:53:53 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA05695; Fri, 26 Mar 2010 17:53:51 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4BACD88E.2040803@icyb.net.ua> Date: Fri, 26 Mar 2010 17:53:50 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100319) MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <4BACC791.70502@icyb.net.ua> <86zl1v84vy.fsf@ds4.des.no> In-Reply-To: <86zl1v84vy.fsf@ds4.des.no> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: periodically save current time to time-of-day hardware X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2010 15:53:54 -0000 on 26/03/2010 17:44 Dag-Erling Smørgrav said the following: > Andriy Gapon writes: >> What do you think about the following patch or something similar? > > I've wondered for years why we didn't already do this. > >> Also, I am aware that the period should be configurable (sysctl). > > Why? Because there would always be someone who would want a different value :) > Although I can see an argument for a sysctl to turn it on or off. Good idea. > IIRC, Linux saves the clock at shutdown, and every 11 minutes if and > only if the system clock is synchronized to an external reference. Both are good ideas too. I know how to add a shutdown hook (event handler), but I don't know how to check if time synchronization is taking place. -- Andriy Gapon