summaryrefslogtreecommitdiff
path: root/timers.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2021-04-20 13:22:37 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2021-04-20 13:22:37 +0200
commitce23ba64bd4c606576a8cd6003c2dfd4f9820ed6 (patch)
treeba94ca208f3efcf699ee5a25020ad0f55d961ec4 /timers.c
parent02c668a6a9c6cbf4fc1638122be53b7155c900e0 (diff)
downloadvdr-ce23ba64bd4c606576a8cd6003c2dfd4f9820ed6.tar.gz
vdr-ce23ba64bd4c606576a8cd6003c2dfd4f9820ed6.tar.bz2
Deleting expired timers is now triggered immediately after the timers are modified
Diffstat (limited to 'timers.c')
-rw-r--r--timers.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/timers.c b/timers.c
index 0cd2bf54..1b6539ae 100644
--- a/timers.c
+++ b/timers.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.c 5.15 2021/04/20 09:50:02 kls Exp $
+ * $Id: timers.c 5.16 2021/04/20 13:22:37 kls Exp $
*/
#include "timers.h"
@@ -1238,9 +1238,11 @@ bool cTimers::AdjustSpawnedTimers(void)
return TimersModified;
}
-bool cTimers::DeleteExpired(void)
+#define DELETE_EXPIRED_TIMEOUT 30 // seconds
+
+bool cTimers::DeleteExpired(bool Force)
{
- if (time(NULL) - lastDeleteExpired < 30)
+ if (!Force && time(NULL) - lastDeleteExpired < DELETE_EXPIRED_TIMEOUT)
return false;
bool TimersModified = false;
cTimer *ti = First();