Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Oct 2012 15:03:29 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r241484 - head/usr.bin/w
Message-ID:  <201210121503.q9CF3TaZ024587@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210121503.q9CF3TaZ024587>