uptime for Win XP?
Richie Hindle
richie at entrian.com
Mon Dec 13 08:12:05 EST 2004
[Esmail]
> Is there a way to display how long a Win XP system has been up?
> Somewhat analogous to the *nix uptime command.
[Greg]
>>> import win32api
>>> print "Uptime:", win32api.GetTickCount(), "Milliseconds"
Note that in the unlikely event of your Windows machine being up for
longer than 2^32 ms (about 49 days), GetTickCount() will wrap back to
zero.
--
Richie Hindle
richie at entrian.com
More information about the Python-list
mailing list