summaryrefslogtreecommitdiffstats
path: root/DateTimeMeter.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-10-06 13:13:16 +0200
committerBenBE <BenBE@geshi.org>2021-03-04 23:57:45 +0100
commit2d1042adb382aa95456beff31b40abb7196567a0 (patch)
tree29e1a48c2927ce887a777b20847efae16b73c977 /DateTimeMeter.c
parent23c5b9ce3c50a7c7aaa9a5734cad50d12610d8d8 (diff)
Save text buffer in Meter
Diffstat (limited to 'DateTimeMeter.c')
-rw-r--r--DateTimeMeter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/DateTimeMeter.c b/DateTimeMeter.c
index fc9e0c89..3fb515b5 100644
--- a/DateTimeMeter.c
+++ b/DateTimeMeter.c
@@ -19,7 +19,7 @@ static const int DateTimeMeter_attributes[] = {
DATETIME
};
-static void DateTimeMeter_updateValues(Meter* this, char* buffer, size_t size) {
+static void DateTimeMeter_updateValues(Meter* this) {
time_t t = time(NULL);
struct tm result;
const struct tm* lt = localtime_r(&t, &result);
@@ -30,7 +30,7 @@ static void DateTimeMeter_updateValues(Meter* this, char* buffer, size_t size) {
this->total = 365;
}
this->values[0] = lt->tm_yday;
- strftime(buffer, size, "%F %H:%M:%S", lt);
+ strftime(this->txtBuffer, sizeof(this->txtBuffer), "%F %H:%M:%S", lt);
}
const MeterClass DateTimeMeter_class = {

© 2014-2024 Faster IT GmbH | imprint | privacy policy