diff options
author | Jochen Dolze <vdr@dolze.de> | 2009-02-15 17:29:14 +0100 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2009-02-15 17:29:14 +0100 |
commit | bb0871b294f05254546258048428c0aa5f8042b8 (patch) | |
tree | f0f4d05fcbc14966cee33aa69598af4be39584f9 /global.h | |
parent | 4623f83447b49830838880320a1fcc9922d00833 (diff) | |
download | vdr-plugin-infosatepg-bb0871b294f05254546258048428c0aa5f8042b8.tar.gz vdr-plugin-infosatepg-bb0871b294f05254546258048428c0aa5f8042b8.tar.bz2 |
Improved wakeup handling
Diffstat (limited to 'global.h')
-rw-r--r-- | global.h | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -124,26 +124,23 @@ private: int this_day; int this_month; int numinfosatchannels; - int wakeuptime; + time_t wakeuptime; struct infosatchannels *infosatchannels; int channel; public: cGlobalInfosatepg(); ~cGlobalInfosatepg(); cGlobalInfosatdata Infosatdata[EPG_DAYS+1]; - void SetWakeupTime(int Time) + void SetWakeupTime(time_t Time) { - if (Time==-1) return; - if (wakeuptime!=-1) return; // already set + if (Time==(time_t) -1) return; + if ((Time>wakeuptime) && (wakeuptime!=(time_t) -1)) return; // already set wakeuptime=Time; - int hour,minute; - hour=(int) (wakeuptime/100); - minute=wakeuptime-(hour*100); - isyslog("infosatepg: wakeup set to %02i:%02i", hour,minute); + isyslog("infosatepg: wakeup set to %s", ctime(&wakeuptime)); } bool NoWakeup; bool NoDeferredShutdown; - int WakeupTime() + time_t WakeupTime() { return wakeuptime; } |