From owner-svn-src-all@FreeBSD.ORG Fri Oct 12 15:03:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B45FC98; Fri, 12 Oct 2012 15:03:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 736928FC08; Fri, 12 Oct 2012 15:03:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9CF3TPj024589; Fri, 12 Oct 2012 15:03:29 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9CF3TaZ024587; Fri, 12 Oct 2012 15:03:29 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201210121503.q9CF3TaZ024587@svn.freebsd.org> From: Ed Maste Date: Fri, 12 Oct 2012 15:03:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241484 - head/usr.bin/w X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Oct 2012 15:03:29 -0000 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;