Commit f5a469b5 authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Use reentrant version to silence warnings.

parent 4027e5ee
......@@ -21,7 +21,8 @@ int ClockMeter_attributes[] = {
static void ClockMeter_setValues(Meter* this, char* buffer, int size) {
time_t t = time(NULL);
struct tm *lt = localtime(&t);
struct tm 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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment