Date: Tue, 23 Mar 2004 10:59:25 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: Chris Landauer <cal@rushg.aero.org> Cc: freebsd-questions@freebsd.org Subject: Re: wraparound value for time Message-ID: <20040323165925.GA2492@dan.emsphone.com> In-Reply-To: <200403222340.i2MNewU01602@calamari.aero.org> References: <200403222340.i2MNewU01602@calamari.aero.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040323165925.GA2492>