diff options
author | Daniel Lange <DLange@git.local> | 2020-12-07 10:26:01 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2020-12-07 10:26:01 +0100 |
commit | 65357c8c46154de4e4eca14075bfe5523bb5fc14 (patch) | |
tree | 8f430ee5a0d5de377c4e7c94e47842a27c70d7e8 /ClockMeter.c | |
parent | f80394a20254938142011855f2954b3f63fe5909 (diff) | |
download | debian_htop-65357c8c46154de4e4eca14075bfe5523bb5fc14.tar.gz debian_htop-65357c8c46154de4e4eca14075bfe5523bb5fc14.tar.bz2 debian_htop-65357c8c46154de4e4eca14075bfe5523bb5fc14.zip |
New upstream version 3.0.3upstream/3.0.3
Diffstat (limited to 'ClockMeter.c')
-rw-r--r-- | ClockMeter.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/ClockMeter.c b/ClockMeter.c index 3168b3e..023ca42 100644 --- a/ClockMeter.c +++ b/ClockMeter.c @@ -1,30 +1,33 @@ /* htop - ClockMeter.c (C) 2004-2011 Hisham H. Muhammad -Released under the GNU GPL, see the COPYING file +Released under the GNU GPLv2, see the COPYING file in the source distribution for its full text. */ -#include "ClockMeter.h" +#include "config.h" // IWYU pragma: keep -#include "CRT.h" +#include "ClockMeter.h" #include <time.h> +#include "CRT.h" +#include "Object.h" + -int ClockMeter_attributes[] = { +static const int ClockMeter_attributes[] = { CLOCK }; -static void ClockMeter_updateValues(Meter* this, char* buffer, int size) { +static void ClockMeter_updateValues(Meter* this, char* buffer, size_t size) { time_t t = time(NULL); struct tm result; - struct tm *lt = localtime_r(&t, &result); + struct tm* lt = localtime_r(&t, &result); this->values[0] = lt->tm_hour * 60 + lt->tm_min; strftime(buffer, size, "%H:%M:%S", lt); } -MeterClass ClockMeter_class = { +const MeterClass ClockMeter_class = { .super = { .extends = Class(Meter), .delete = Meter_delete |