www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/02/02/12:37:58

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=BAYES_05
X-Spam-Check-By: sourceware.org
Date: Mon, 02 Feb 2009 17:37:26 +0000
From: Owen Rees <owen DOT rees AT hp DOT com>
To: cygwin AT cygwin DOT com
Subject: RE: Finding either boot time or login time
Message-ID: <B74CC1CB4CF75003190E29AE@rrees2.emea.hpqcorp.net>
In-Reply-To: <7b4dai$em8g8@dmzms99901.na.baesystems.com>
References: <7b4dai$em8g8 AT dmzms99901 DOT na DOT baesystems DOT com>
MIME-Version: 1.0
X-HPL-MailScanner: Found to be clean
X-HPL-MailScanner-From: owen DOT rees AT hp DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

--On 02 February 2009 11:54 -0500 Cooper, Karl \(US SSA\) wrote:

> I don't know perl, but I did try both of these one-liners on my
> Cygwin 1.7 setup, and the output differs (by one second).  I thought
> that was interesting.

I get a one second difference between the two formulae as well (due to the 
use of 'int' in one but not the other) but that is insignificant compared 
to the 1 hour and 43 minutes by which both are wrong (and that is since 
rebooting at 08:57 this morning).

As far as I can tell, uptime does not include time spent in hibernation (or 
suspend/sleep probably).

A little web searching suggests that not counting sleep time is probably 
consistent with recent Linux behaviour.

I also noticed that the Windows Vista 'systeminfo' command gives the same 
wrong answer for "System Boot Time".

-- 
Owen Rees; speaking personally, and not on behalf of HP.
========================================================
Hewlett-Packard Limited.   Registered No: 690597 England
Registered Office:  Cain Road, Bracknell, Berks RG12 1HN


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019