forked from enlightenment/enlightenment
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:
parent
14e1583cd0
commit
73855900ed
|
@ -58,6 +58,7 @@ _temperature_thread_free(Tempthread *tth)
|
||||||
#if defined(HAVE_EEZE)
|
#if defined(HAVE_EEZE)
|
||||||
EINA_LIST_FREE(tth->tempdevs, s) eina_stringshare_del(s);
|
EINA_LIST_FREE(tth->tempdevs, s) eina_stringshare_del(s);
|
||||||
#endif
|
#endif
|
||||||
|
e_powersave_sleeper_free(tth->sleeper);
|
||||||
free(tth->extn);
|
free(tth->extn);
|
||||||
free(tth);
|
free(tth);
|
||||||
}
|
}
|
||||||
|
@ -329,7 +330,7 @@ _temperature_check_main(void *data, Ecore_Thread *th)
|
||||||
temp = temperature_tempget_get(tth);
|
temp = temperature_tempget_get(tth);
|
||||||
if (ptemp != temp) ecore_thread_feedback(th, (void *)((long)temp));
|
if (ptemp != temp) ecore_thread_feedback(th, (void *)((long)temp));
|
||||||
ptemp = 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;
|
if (ecore_thread_check(th)) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -362,6 +363,7 @@ temperature_face_update_config(Config_Face *inst)
|
||||||
tth->poll_interval = inst->poll_interval;
|
tth->poll_interval = inst->poll_interval;
|
||||||
tth->sensor_type = inst->sensor_type;
|
tth->sensor_type = inst->sensor_type;
|
||||||
tth->inst = inst;
|
tth->inst = inst;
|
||||||
|
tth->sleeper = e_powersave_sleeper_new();
|
||||||
if (inst->sensor_name)
|
if (inst->sensor_name)
|
||||||
tth->sensor_name = eina_stringshare_add(inst->sensor_name);
|
tth->sensor_name = eina_stringshare_add(inst->sensor_name);
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ struct _Tempthread
|
||||||
const char *sensor_name;
|
const char *sensor_name;
|
||||||
const char *sensor_path;
|
const char *sensor_path;
|
||||||
void *extn;
|
void *extn;
|
||||||
|
E_Powersave_Sleeper *sleeper;
|
||||||
#ifdef HAVE_EEZE
|
#ifdef HAVE_EEZE
|
||||||
Eina_List *tempdevs;
|
Eina_List *tempdevs;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue