diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2021-04-20 13:22:37 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2021-04-20 13:22:37 +0200 |
commit | ce23ba64bd4c606576a8cd6003c2dfd4f9820ed6 (patch) | |
tree | ba94ca208f3efcf699ee5a25020ad0f55d961ec4 /timers.c | |
parent | 02c668a6a9c6cbf4fc1638122be53b7155c900e0 (diff) | |
download | vdr-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.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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(); |