Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Ivan Shmakov Newsgroups: comp.os.linux.development.system,comp.unix.programmer Subject: Re: Getting time of last reboot on Linux Date: Tue, 20 Dec 2011 11:48:02 +0700 Organization: Aioe.org NNTP Server Lines: 23 Message-ID: <86zken7ssd.fsf@gray.siamics.net> References: <4c0afddf-5e6e-41f5-b8d2-b65afcc4ee29@z1g2000vbx.googlegroups.com> NNTP-Posting-Host: FtDGZaUx6k7Bzdiv4MgYAg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:P0B9MmqdQSNpQZ8U1MCUaNrUAAc= Xref: x330-a1.tempe.blueboxinc.net comp.os.linux.development.system:354 comp.unix.programmer:1839 >>>>> William Ahern writes: [...] > However, last time I inquired with Google, 32-bit Linux had a > wrapping issue with /proc/uptime (and presumably uptime(3)). The > uptime gives seconds, but is computed in jiffies, which has a much > higher resolution but overflows much faster--400-something days on > some 2.4 kernels. Indeed, I've had such a problem on one of my home systems once. Assuming the rate of 100 jiffies per second, it gives some 497 days before the overflow. (/ (expt 2 32) 100.0 60 60 24) => 497.1026(962) [...] -- FSF associate member #7257