svn commit: r243293 - stable/9/usr.bin/w

Ed Maste emaste at FreeBSD.org
Mon Nov 19 18:18:24 UTC 2012


Author: emaste
Date: Mon Nov 19 18:18:24 2012
New Revision: 243293
URL: http://svnweb.freebsd.org/changeset/base/243293

Log:
  MFC r241484: Use CLOCK_UPTIME to get the uptime.

Modified:
  stable/9/usr.bin/w/w.c
Directory Properties:
  stable/9/usr.bin/w/   (props changed)

Modified: stable/9/usr.bin/w/w.c
==============================================================================
--- stable/9/usr.bin/w/w.c	Mon Nov 19 18:09:00 2012	(r243292)
+++ stable/9/usr.bin/w/w.c	Mon Nov 19 18:18:24 2012	(r243293)
@@ -448,7 +448,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-stable-9 mailing list