Return to w.c CVS log | Up to [local] / src / usr.bin / w |
version 1.57, 2015/01/16 06:40:14 | version 1.58, 2015/03/15 00:41:28 | ||
---|---|---|---|
|
|
||
#include <stdio.h> | #include <stdio.h> | ||
#include <stdlib.h> | #include <stdlib.h> | ||
#include <string.h> | #include <string.h> | ||
#include <tzfile.h> | |||
#include <unistd.h> | #include <unistd.h> | ||
#include <limits.h> | #include <limits.h> | ||
#include <utmp.h> | #include <utmp.h> | ||
|
|
||
uptime %= SECSPERDAY; | uptime %= SECSPERDAY; | ||
hrs = uptime / SECSPERHOUR; | hrs = uptime / SECSPERHOUR; | ||
uptime %= SECSPERHOUR; | uptime %= SECSPERHOUR; | ||
mins = uptime / SECSPERMIN; | mins = uptime / 60; | ||
(void)printf(" up"); | (void)printf(" up"); | ||
if (days > 0) | if (days > 0) | ||
(void)printf(" %d day%s,", days, | (void)printf(" %d day%s,", days, |