diff options
author | louis <louis.braun@gmx.de> | 2013-05-20 11:37:37 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-05-20 11:37:37 +0200 |
commit | c611e004582067640111ef2f023410025201157d (patch) | |
tree | 3a71e9893bffa4bf9d38c49389dad5f43d046ec3 /timer.c | |
parent | 063094f442c0ac3c592d2e5bb5c416d6820d2602 (diff) | |
download | vdr-plugin-tvguide-c611e004582067640111ef2f023410025201157d.tar.gz vdr-plugin-tvguide-c611e004582067640111ef2f023410025201157d.tar.bz2 |
rewrote epg grid handling and scrolling, added status header
Diffstat (limited to 'timer.c')
-rw-r--r-- | timer.c | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -3,16 +3,24 @@ cMyTime::~cMyTime(void) {
}
+cString cMyTime::printTime(time_t displayTime) {
+ struct tm *ts;
+ ts = localtime(&displayTime);
+ cString strTime = cString::sprintf("%d.%d-%d:%d.%d", ts->tm_mday, ts->tm_mon+1, ts->tm_hour, ts->tm_min, ts->tm_sec);
+ return strTime;
+}
+
+
void cMyTime::Now() {
t = time(0);
tStart = t;
tStart = GetRounded();
- tStop = tStart + (tvguideConfig.osdHeight - tvguideConfig.headerHeight - tvguideConfig.footerHeight)/tvguideConfig.minuteHeight*60;
+ tEnd = tStart + (tvguideConfig.osdHeight - tvguideConfig.statusHeaderHeight - tvguideConfig.headerHeight - tvguideConfig.footerHeight)/tvguideConfig.minuteHeight*60;
}
void cMyTime::AddStep(int step) {
tStart += step*60;
- tStop += step*60;
+ tEnd += step*60;
}
bool cMyTime::DelStep(int step) {
@@ -20,13 +28,13 @@ bool cMyTime::DelStep(int step) { return true;
}
tStart -= step*60;
- tStop -= step*60;
+ tEnd -= step*60;
return false;
}
void cMyTime::SetTime(time_t newTime) {
tStart = newTime;
- tStop = tStart + (tvguideConfig.osdHeight - tvguideConfig.headerHeight - tvguideConfig.footerHeight)/tvguideConfig.minuteHeight*60;
+ tEnd = tStart + (tvguideConfig.osdHeight - tvguideConfig.statusHeaderHeight - tvguideConfig.headerHeight - tvguideConfig.footerHeight)/tvguideConfig.minuteHeight*60;
}
time_t cMyTime::getPrevPrimetime(time_t current) {
@@ -102,5 +110,5 @@ time_t cMyTime::GetRounded() { }
void cMyTime::debug() {
- esyslog("t: %s, tStart: %s, tStop: %s", *TimeString(t), *TimeString(tStart), *TimeString(tStop));
+ esyslog("t: %s, tStart: %s, tEnd: %s", *TimeString(t), *TimeString(tStart), *TimeString(tEnd));
}
|