version 1.17, 2015/10/09 01:37:08 |
version 1.18, 2018/02/09 23:12:13 |
|
|
|
|
secs = (hours - t->tm_hour) * HOUR; |
secs = (hours - t->tm_hour) * HOUR; |
secs += (minutes - t->tm_min) * MINUTE; |
secs += (minutes - t->tm_min) * MINUTE; |
|
secs -= t->tm_sec; /* aim for beginning of minute */ |
} |
} |
doalarm(secs); |
doalarm(secs); |
exit(0); |
exit(0); |
|
|
sleep(secs - MINUTE); |
sleep(secs - MINUTE); |
if (puts("\a\aJust one more minute!") == EOF) |
if (puts("\a\aJust one more minute!") == EOF) |
exit(0); |
exit(0); |
|
secs = MINUTE; |
} |
} |
|
|
|
sleep(secs); |
|
|
for (bother = 10; bother--;) { |
for (bother = 10; bother--;) { |
sleep(MINUTE); |
|
if (puts("\a\aTime to leave!") == EOF) |
if (puts("\a\aTime to leave!") == EOF) |
exit(0); |
exit(0); |
|
if (bother) |
|
sleep(MINUTE); |
} |
} |
|
|
puts("\a\aThat was the last time I'll tell you. Bye."); |
puts("\a\aThat was the last time I'll tell you. Bye."); |