Use reentrant version to silence warnings.

This commit is contained in:
Hisham Muhammad 2014-04-21 18:59:30 -03:00
parent 4027e5ee44
commit f5a469b5a8

View File

@ -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);
}