summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-03-14 14:28:08 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2004-03-14 14:28:08 +0100
commitac89e31bde3711d00e9e5a6cc8560d687dfec520 (patch)
tree5ee45764b66edd72ac9c8dd8fdb0a18f07778791 /vdr.c
parent07dc53331e62b29cc7659a23de4d7348f4788bd7 (diff)
downloadvdr-ac89e31bde3711d00e9e5a6cc8560d687dfec520.tar.gz
vdr-ac89e31bde3711d00e9e5a6cc8560d687dfec520.tar.bz2
Avoiding occasional bad responsiveness to user interaction caused by assigning events to timers
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/vdr.c b/vdr.c
index ec03c21a..af95f377 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.179 2004/03/07 09:39:54 kls Exp $
+ * $Id: vdr.c 1.180 2004/03/14 14:25:02 kls Exp $
*/
#include <getopt.h>
@@ -549,10 +549,13 @@ int main(int argc, char *argv[])
PreviousChannel[PreviousChannelIndex ^= 1] = LastChannel;
// Timers and Recordings:
if (!Timers.BeingEdited()) {
- static time_t LastSetEvents = 0;//XXX trigger by actual EPG data modification???
- if (!Menu && time(NULL) - LastSetEvents > 5) {
- Timers.SetEvents();
- LastSetEvents = time(NULL);
+ // Assign events to timers:
+ if (time(NULL) - LastActivity > 10) {
+ static time_t LastSetEvents = 0;//XXX trigger by actual EPG data modification???
+ if (time(NULL) - LastSetEvents > 5) {
+ Timers.SetEvents();
+ LastSetEvents = time(NULL);
+ }
}
time_t Now = time(NULL); // must do all following calls with the exact same time!
// Process ongoing recordings: