1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Avoiding occasional bad responsiveness to user interaction caused by assigning events to timers

This commit is contained in:
Klaus Schmidinger 2004-03-14 14:28:08 +01:00
parent 07dc53331e
commit ac89e31bde
2 changed files with 10 additions and 5 deletions

View File

@ -2741,3 +2741,5 @@ Video Disk Recorder Revision History
- Improved performance when paging through very long menu lists. - Improved performance when paging through very long menu lists.
- Removed cSchedule::GetEventNumber() and cSchedule::NumEvents(). There is now - Removed cSchedule::GetEventNumber() and cSchedule::NumEvents(). There is now
cSchedule::Events() that returns the list of events directly. cSchedule::Events() that returns the list of events directly.
- Avoiding occasional bad responsiveness to user interaction caused by assigning
events to timers.

7
vdr.c
View File

@ -22,7 +22,7 @@
* *
* The project's page is at http://www.cadsoft.de/vdr * 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> #include <getopt.h>
@ -549,11 +549,14 @@ int main(int argc, char *argv[])
PreviousChannel[PreviousChannelIndex ^= 1] = LastChannel; PreviousChannel[PreviousChannelIndex ^= 1] = LastChannel;
// Timers and Recordings: // Timers and Recordings:
if (!Timers.BeingEdited()) { if (!Timers.BeingEdited()) {
// Assign events to timers:
if (time(NULL) - LastActivity > 10) {
static time_t LastSetEvents = 0;//XXX trigger by actual EPG data modification??? static time_t LastSetEvents = 0;//XXX trigger by actual EPG data modification???
if (!Menu && time(NULL) - LastSetEvents > 5) { if (time(NULL) - LastSetEvents > 5) {
Timers.SetEvents(); Timers.SetEvents();
LastSetEvents = time(NULL); LastSetEvents = time(NULL);
} }
}
time_t Now = time(NULL); // must do all following calls with the exact same time! time_t Now = time(NULL); // must do all following calls with the exact same time!
// Process ongoing recordings: // Process ongoing recordings:
cRecordControls::Process(Now); cRecordControls::Process(Now);