raster pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=73855900ed3804ecc4e755ff08470ecce8ea90c1
commit 73855900ed3804ecc4e755ff08470ecce8ea90c1 Author: Carsten Haitzler (Rasterman) <[email protected]> Date: Tue Sep 12 09:10:19 2017 +0900 Revert "Temperature module: Don't use e_powersave_sleep. It doesn't work for ticks faster than a second." This reverts commit 4a92502f81a1006cf5fbc3b3dda70a902e740788. --- src/modules/temperature/e_mod_main.c | 4 +++- src/modules/temperature/e_mod_main.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/temperature/e_mod_main.c b/src/modules/temperature/e_mod_main.c index c90556fa0..a4e99a5c9 100644 --- a/src/modules/temperature/e_mod_main.c +++ b/src/modules/temperature/e_mod_main.c @@ -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); diff --git a/src/modules/temperature/e_mod_main.h b/src/modules/temperature/e_mod_main.h index 52077405c..b9cf67187 100644 --- a/src/modules/temperature/e_mod_main.h +++ b/src/modules/temperature/e_mod_main.h @@ -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 --
