X-Recipient: archive-cygwin@delorie.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.rees@hp.com>
To: cygwin@cygwin.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@dmzms99901.na.baesystems.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
X-HPL-MailScanner: Found to be clean
X-HPL-MailScanner-From: owen.rees@hp.com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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/

