Revert "Temperature module: Don't use e_powersave_sleep. It doesn't work for ticks faster than a second."

This reverts commit 4a92502f81.
This commit is contained in:
Carsten Haitzler 2017-09-12 09:10:19 +09:00
parent 14e1583cd0
commit 73855900ed
2 changed files with 4 additions and 1 deletions

View File

@ -58,6 +58,7 @@ _temperature_thread_free(Tempthread *tth)
#if defined(HAVE_EEZE)
EINA_LIST_FREE(tth->tempdevs, s) eina_stringshare_del(s);
#endif
e_powersave_sleeper_free(tth->sleeper);
free(tth->extn);
free(tth);
}
@ -329,7 +330,7 @@ _temperature_check_main(void *data, Ecore_Thread *th)
temp = temperature_tempget_get(tth);
if (ptemp != temp) ecore_thread_feedback(th, (void *)((long)temp));
ptemp = temp;
usleep((1000000.0 / 8.0) * (double)tth->poll_interval);
e_powersave_sleeper_sleep(tth->sleeper, tth->poll_interval);
if (ecore_thread_check(th)) break;
}
}
@ -362,6 +363,7 @@ temperature_face_update_config(Config_Face *inst)
tth->poll_interval = inst->poll_interval;
tth->sensor_type = inst->sensor_type;
tth->inst = inst;
tth->sleeper = e_powersave_sleeper_new();
if (inst->sensor_name)
tth->sensor_name = eina_stringshare_add(inst->sensor_name);

View File

@ -42,6 +42,7 @@ struct _Tempthread
const char *sensor_name;
const char *sensor_path;
void *extn;
E_Powersave_Sleeper *sleeper;
#ifdef HAVE_EEZE
Eina_List *tempdevs;
#endif