summaryrefslogtreecommitdiffstats
path: root/usr.bin/w/w.c
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2012-10-12 15:03:28 +0000
committeremaste <emaste@FreeBSD.org>2012-10-12 15:03:28 +0000
commit6e22acd47bf1dfd002d3a75ebc6decf639036bc5 (patch)
tree9384b63f96b450fde2b80bbe37a3e8c4af547491 /usr.bin/w/w.c
parentd778566d9535f1c0f12c401a0ab3acaf6868b3f8 (diff)
downloadFreeBSD-src-6e22acd47bf1dfd002d3a75ebc6decf639036bc5.zip
FreeBSD-src-6e22acd47bf1dfd002d3a75ebc6decf639036bc5.tar.gz
Use CLOCK_UPTIME to get the uptime.
Diffstat (limited to 'usr.bin/w/w.c')
-rw-r--r--usr.bin/w/w.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c
index 8441ce5..2e19bb1 100644
--- a/usr.bin/w/w.c
+++ b/usr.bin/w/w.c
@@ -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;
OpenPOWER on IntegriCloud