Use CLOCK_UPTIME to get the uptime.

This commit is contained in:
Ed Maste 2012-10-12 15:03:28 +00:00
parent cfccce310a
commit b6eec535d3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=241484

View File

@ -447,7 +447,7 @@ pr_header(time_t *nowp, int nusers)
/*
* Print how long system has been up.
*/
if (clock_gettime(CLOCK_MONOTONIC, &tp) != -1) {
if (clock_gettime(CLOCK_UPTIME, &tp) != -1) {
uptime = tp.tv_sec;
if (uptime > 60)
uptime += 30;