summaryrefslogtreecommitdiff
path: root/global.h
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2009-02-15 17:29:14 +0100
committerJochen Dolze <vdr@dolze.de>2009-02-15 17:29:14 +0100
commitbb0871b294f05254546258048428c0aa5f8042b8 (patch)
treef0f4d05fcbc14966cee33aa69598af4be39584f9 /global.h
parent4623f83447b49830838880320a1fcc9922d00833 (diff)
downloadvdr-plugin-infosatepg-bb0871b294f05254546258048428c0aa5f8042b8.tar.gz
vdr-plugin-infosatepg-bb0871b294f05254546258048428c0aa5f8042b8.tar.bz2
Improved wakeup handling
Diffstat (limited to 'global.h')
-rw-r--r--global.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/global.h b/global.h
index 2f25aad..774e231 100644
--- a/global.h
+++ b/global.h
@@ -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;
}