version 1.26, 2010/06/13 15:26:06 |
version 1.27, 2013/08/22 04:43:40 |
|
|
hi(int signo) |
hi(int signo) |
{ |
{ |
char buf[1024], buf2[1024]; |
char buf[1024], buf2[1024]; |
time_t now; |
time_t left; |
|
|
if (no_timeout) |
if (no_timeout) |
buf2[0] = '\0'; |
buf2[0] = '\0'; |
else { |
else { |
now = time(NULL); |
left = nexttime - time(NULL); |
(void)snprintf(buf2, sizeof buf2, " timeout in %d:%d minutes", |
(void)snprintf(buf2, sizeof buf2, " timeout in %lld:%d minutes", |
(nexttime - now) / 60, (nexttime - now) % 60); |
(long long)(left / 60), (int)(left % 60)); |
} |
} |
(void)snprintf(buf, sizeof buf, "%s: type in the unlock key.%s\n", |
(void)snprintf(buf, sizeof buf, "%s: type in the unlock key.%s\n", |
__progname, buf2); |
__progname, buf2); |