version 1.6, 1996/06/26 05:42:43 |
version 1.7, 1996/07/13 17:24:50 |
|
|
int days = idle / SECSPERDAY; |
int days = idle / SECSPERDAY; |
|
|
/* If idle more than 36 hours, print as a number of days. */ |
/* If idle more than 36 hours, print as a number of days. */ |
if (idle >= 36 * SECSPERHOUR) |
if (idle >= 36 * SECSPERHOUR) { |
printf(days == 1 ? " %dday " : " %ddays ", days); |
if (days == 1) |
|
printf(" %dday ", days); |
|
else if (days < 10) |
|
printf(" %ddays ", days); |
|
else |
|
printf("%ddays ", days); |
|
} |
|
|
/* If idle more than an hour, print as HH:MM. */ |
/* If idle more than an hour, print as HH:MM. */ |
else if (idle >= SECSPERHOUR) |
else if (idle >= SECSPERHOUR) |