Save text buffer in Meter

This commit is contained in:
Christian Göttsche
2020-10-06 13:13:16 +02:00
committed by BenBE
parent 23c5b9ce3c
commit 2d1042adb3
23 changed files with 73 additions and 68 deletions

View File

@ -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 = {