1

Closed

24.9 Days uptime.exe displays wrong results.

description

Environment.TickCount shouldn't be used to calculate the uptime. After 24,9 Days it overflows to Int32.MinValue. See: http://msdn.microsoft.com/en-us/library/system.environment.tickcount.aspx
 
A better approach is to use the eventlog to determine the last boot time.
 
Thanks to jkalmbach for this hint.
Closed Aug 12, 2009 at 10:06 AM by StanleyJobbson
Fixed calculation by including starting date of the current event-log service.

comments