luigimarmo / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

Add .uptime() method #359

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently psutil supports .BOOT_TIME attribute, but this attribute is not a 
subject to clock updates done by NTP daemon/ntpdate and such software, at least 
on linux. On the other hand, methods usually used to get uptime (subtraction of 
.BOOT_TIME from time.time()) are subject to clock updates, meaning that this 
attribute cannot be used to get system uptime.

Original issue reported on code.google.com by zyx....@gmail.com on 17 Mar 2013 at 8:49

GoogleCodeExporter commented 8 years ago
Agreed. 
A new psutil.get_boot_time() function is now available. 
I chose that name in order to be consistent with BOOT_TIME.
Done in revision dfd6641057c8.

Original comment by g.rodola on 19 Mar 2013 at 2:10

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 8 Apr 2013 at 1:21

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 11 Apr 2013 at 9:17

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 12 Apr 2013 at 6:21