svn commit: r241484 - head/usr.bin/w

Ed Maste emaste at FreeBSD.org
Fri Oct 12 15:03:29 UTC 2012


Author: emaste
Date: Fri Oct 12 15:03:28 2012
New Revision: 241484
URL: http://svn.freebsd.org/changeset/base/241484

Log:
  Use CLOCK_UPTIME to get the uptime.

Modified:
  head/usr.bin/w/w.c

Modified: head/usr.bin/w/w.c
==============================================================================
--- head/usr.bin/w/w.c	Fri Oct 12 13:17:19 2012	(r241483)
+++ head/usr.bin/w/w.c	Fri Oct 12 15:03:28 2012	(r241484)
@@ -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;


More information about the svn-src-all mailing list