In queue mode, wake up once a minute to recalibrate sleep time. Required

for laptops that hibernate or suspend.
This commit is contained in:
David F. Skoll
2007-09-04 14:16:12 -04:00
parent b14b4f08b1
commit 7401a0ba23
2 changed files with 10 additions and 2 deletions
+8
View File
@@ -181,6 +181,14 @@ void HandleQueuedReminders(void)
if (Daemon > 0 && SleepTime > 60*Daemon) SleepTime = 60*Daemon;
/* Wake up once a minute to recalibrate sleep time in
case of laptop hibernation */
if (Daemon <= 0) {
if (SleepTime > 60) {
SleepTime = 60;
}
}
if (Daemon >= 0) {
sleep(SleepTime);
} else {