From owner-freebsd-questions@FreeBSD.ORG Tue Mar 23 08:59:27 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 44E7116A4CE for ; Tue, 23 Mar 2004 08:59:27 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id EAA9143D2F for ; Tue, 23 Mar 2004 08:59:26 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i2NGxPk4045229; Tue, 23 Mar 2004 10:59:25 -0600 (CST) (envelope-from dan) Date: Tue, 23 Mar 2004 10:59:25 -0600 From: Dan Nelson To: Chris Landauer Message-ID: <20040323165925.GA2492@dan.emsphone.com> References: <200403222340.i2MNewU01602@calamari.aero.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200403222340.i2MNewU01602@calamari.aero.org> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: freebsd-questions@freebsd.org Subject: Re: wraparound value for time X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2004 16:59:27 -0000 In the last episode (Mar 22), Chris Landauer said: > i am running some very long programs, and it appears that time wraps > around in its counting (the 72 cpu hour program did not wrap, the 164 > cpu hour program did) Which value wrapped? user, system, or elapsed? > i tried to figure out where the actual code for time is, but i can't > quite tell - it appears to be buried inside csh somewhere (it also > appears that there are several different possibilities for the data > type used, depending on some compile time parameters for the csh > compilation) The best I could come up with was that elapsed time might be stored in a long variable in milliseconds, which would wrap at 49.7 days. User and system times are stored as "struct timeval"s and should never wrap. > finally, can anybody tell me what the default tick size is? or > better, where i can look to find out? "sysctl kern.clockrate" has that info. Hz defaults to 100, and tick is 1000000 / hz = 10000. You can adjust Hz by setting kern.hz in /boot/loader.conf. -- Dan Nelson dnelson@allantgroup.com