4d3c19af52
Read the time of system boot from /proc/stat (entry: btime) instead of computing it as the difference between the current time and the uptime. This is the only way to get a consistent result which won't possibly change from one run to the next. The problems with the original code were: * Both the current time and the uptime are rounded down to the second, but the system doesn't boot on an integer second value so they do not tick at the same moment. Thus, the rounding errors can cause a one second difference from one run to the next. * We can't read the uptime and the current time at the exact same moment anyway, so the time difference we compute is bound to be inaccurate. Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=222251 Author: Jean Delvare <jdelvare@suse.de> Reviewed-by: Craig Small <csmall@debian.org> |
||
---|---|---|
.. | ||
.cvsignore | ||
common.h | ||
COPYING | ||
display.c | ||
global.c | ||
HACKING | ||
help.c | ||
it | ||
module.mk | ||
output.c | ||
p | ||
parser.c | ||
ps.1 | ||
regression | ||
select.c | ||
sortformat.c | ||
stacktrace.c | ||
TRANSLATION |