okra pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=4a92502f81a1006cf5fbc3b3dda70a902e740788

commit 4a92502f81a1006cf5fbc3b3dda70a902e740788
Author: Stephen 'Okra' Houston <[email protected]>
Date:   Mon Sep 11 13:31:03 2017 -0500

    Temperature module: Don't use e_powersave_sleep.  It doesn't work for ticks 
faster than a second.
---
 src/modules/temperature/e_mod_main.c | 6 ++----
 src/modules/temperature/e_mod_main.h | 1 -
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/modules/temperature/e_mod_main.c 
b/src/modules/temperature/e_mod_main.c
index a4e99a5c9..d05f9e77a 100644
--- a/src/modules/temperature/e_mod_main.c
+++ b/src/modules/temperature/e_mod_main.c
@@ -58,7 +58,6 @@ _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);
 }
@@ -294,7 +293,7 @@ _temperature_face_shutdown(const Eina_Hash *hash 
EINA_UNUSED, const void *key EI
    if (inst->sensor_name) eina_stringshare_del(inst->sensor_name);
    if (inst->id) eina_stringshare_del(inst->id);
 #ifdef HAVE_EEZE
-   if (inst->poller)
+    if (inst->poller)
      {
         ecore_poller_del(inst->poller);
         _temperature_thread_free(inst->tth);
@@ -330,7 +329,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;
-        e_powersave_sleeper_sleep(tth->sleeper, tth->poll_interval);
+        usleep((1000000.0 / 8.0) * (double)tth->poll_interval);
         if (ecore_thread_check(th)) break;
      }
 }
@@ -363,7 +362,6 @@ 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 b9cf67187..52077405c 100644
--- a/src/modules/temperature/e_mod_main.h
+++ b/src/modules/temperature/e_mod_main.h
@@ -42,7 +42,6 @@ struct _Tempthread
    const char *sensor_name;
    const char *sensor_path;
    void *extn;
-   E_Powersave_Sleeper *sleeper;
 #ifdef HAVE_EEZE
    Eina_List *tempdevs;
 #endif

-- 


Reply via email to