summaryrefslogtreecommitdiffstats
path: root/ClockMeter.c
diff options
context:
space:
mode:
Diffstat (limited to 'ClockMeter.c')
-rw-r--r--ClockMeter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ClockMeter.c b/ClockMeter.c
index 410c7e8a..de47bdcb 100644
--- a/ClockMeter.c
+++ b/ClockMeter.c
@@ -20,9 +20,10 @@ static const int ClockMeter_attributes[] = {
};
static void ClockMeter_updateValues(Meter* this) {
- time_t t = time(NULL);
+ const ProcessList* pl = this->pl;
+
struct tm result;
- const struct tm* lt = localtime_r(&t, &result);
+ const struct tm* lt = localtime_r(&pl->timestamp.tv_sec, &result);
this->values[0] = lt->tm_hour * 60 + lt->tm_min;
strftime(this->txtBuffer, sizeof(this->txtBuffer), "%H:%M:%S", lt);
}