Lines Matching refs:idle
103 * Display the idle time.
104 * Returns number of excess characters that were used for long idle time.
107 pr_idle(time_t idle)
109 /* If idle more than 36 hours, print as a number of days. */
110 if (idle >= 36 * 3600) {
111 int days = idle / 86400;
112 xo_emit(" {:idle/%dday%s} ", days, days > 1 ? "s" : " " );
119 /* If idle more than an hour, print as HH:MM. */
120 else if (idle >= 3600)
121 xo_emit(" {:idle/%2d:%02d/} ",
122 (int)(idle / 3600), (int)((idle % 3600) / 60));
124 else if (idle / 60 == 0)
127 /* Else print the minutes idle. */
129 xo_emit(" {:idle/%2d} ", (int)(idle / 60));
131 return (0); /* not idle longer than 9 days */