diff options
Diffstat (limited to 'ClockMeter.c')
-rw-r--r-- | ClockMeter.c | 5 |
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); } |