[Midnightbsd-cvs] src [8423] trunk/usr.bin/w/w.c: use CLOCK_UPTIME to get uptime
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Sep 18 17:09:47 EDT 2016
Revision: 8423
http://svnweb.midnightbsd.org/src/?rev=8423
Author: laffer1
Date: 2016-09-18 17:09:47 -0400 (Sun, 18 Sep 2016)
Log Message:
-----------
use CLOCK_UPTIME to get uptime
Modified Paths:
--------------
trunk/usr.bin/w/w.c
Modified: trunk/usr.bin/w/w.c
===================================================================
--- trunk/usr.bin/w/w.c 2016-09-18 21:09:33 UTC (rev 8422)
+++ trunk/usr.bin/w/w.c 2016-09-18 21:09:47 UTC (rev 8423)
@@ -448,7 +448,7 @@
/*
* 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;
More information about the Midnightbsd-cvs
mailing list