powersave usage - dont use usleep at all. pwoersave sleep replaces it

also... there isn't realy a need to track the screensaver state...
powersave sleep will drop back to an hour between sleeps if we're in
freeze mode (it could be longer or even be indefinite). it will be
woken up if powersave state changes...
This commit is contained in:
Carsten Haitzler 2017-07-19 10:21:56 +09:00
parent 4077b3ce59
commit e7eaef62f3
6 changed files with 0 additions and 28 deletions

View File

@ -828,10 +828,6 @@ _cpuclock_cb_frequency_check_main(void *data, Ecore_Thread *th)
_cpuclock_status_free(status);
if (ecore_thread_check(th)) break;
e_powersave_sleeper_sleep(thc->sleeper, thc->interval);
if (e_powersave_mode_get() == E_POWERSAVE_MODE_FREEZE)
usleep((1000000.0 / 800.0) * (double)thc->interval);
else
usleep((1000000.0 / 8.0) * (double)thc->interval);
if (ecore_thread_check(th)) break;
}
}

View File

@ -175,10 +175,6 @@ _cpumonitor_cb_usage_check_main(void *data, Ecore_Thread *th)
ecore_thread_feedback(th, NULL);
if (ecore_thread_check(th)) break;
e_powersave_sleeper_sleep(thc->sleeper, thc->interval);
if (e_powersave_mode_get() == E_POWERSAVE_MODE_FREEZE)
usleep((1000000.0 / 800.0) * (double)thc->interval);
else
usleep((1000000.0 / 8.0) * (double)thc->interval);
if (ecore_thread_check(th)) break;
}
}

View File

@ -295,10 +295,6 @@ _memusage_cb_usage_check_main(void *data, Ecore_Thread *th)
ecore_thread_feedback(th, NULL);
if (ecore_thread_check(th)) break;
e_powersave_sleeper_sleep(thc->sleeper, thc->interval);
if (e_powersave_mode_get() == E_POWERSAVE_MODE_FREEZE)
usleep((1000000.0 / 800.0) * (double)thc->interval);
else
usleep((1000000.0 / 8.0) * (double)thc->interval);
if (ecore_thread_check(th)) break;
}
}

View File

@ -180,10 +180,6 @@ _netstatus_cb_usage_check_main(void *data, Ecore_Thread *th)
ecore_thread_feedback(th, NULL);
if (ecore_thread_check(th)) break;
e_powersave_sleeper_sleep(thc->sleeper, thc->interval);
if (e_powersave_mode_get() == E_POWERSAVE_MODE_FREEZE)
usleep((1000000.0 / 800.0) * (double)thc->interval);
else
usleep((1000000.0 / 8.0) * (double)thc->interval);
if (ecore_thread_check(th)) break;
}
}

View File

@ -98,10 +98,6 @@ _thermal_check_sysctl(void *data, Ecore_Thread *th)
if (ptemp != temp) ecore_thread_feedback(th, (void *)((long)temp));
ptemp = temp;
e_powersave_sleeper_sleep(tth->sleeper, tth->poll_interval);
if (e_powersave_mode_get() == E_POWERSAVE_MODE_FREEZE)
usleep((1000000.0 / 800.0) * (double)tth->poll_interval);
else
usleep((1000000.0 / 8.0) * (double)tth->poll_interval);
if (ecore_thread_check(th)) break;
}
}
@ -120,10 +116,6 @@ _thermal_check_fallback(void *data, Ecore_Thread *th)
if (ptemp != temp) ecore_thread_feedback(th, (void *)((long)temp));
ptemp = temp;
e_powersave_sleeper_sleep(tth->sleeper, tth->poll_interval);
if (e_powersave_mode_get() == E_POWERSAVE_MODE_FREEZE)
usleep((1000000.0 / 800.0) * (double)tth->poll_interval);
else
usleep((1000000.0 / 8.0) * (double)tth->poll_interval);
if (ecore_thread_check(th)) break;
}
}

View File

@ -331,10 +331,6 @@ _temperature_check_main(void *data, Ecore_Thread *th)
if (ptemp != temp) ecore_thread_feedback(th, (void *)((long)temp));
ptemp = temp;
e_powersave_sleeper_sleep(tth->sleeper, tth->poll_interval);
if (e_powersave_mode_get() == E_POWERSAVE_MODE_FREEZE)
usleep((1000000.0 / 800.0) * (double)tth->poll_interval);
else
usleep((1000000.0 / 8.0) * (double)tth->poll_interval);
if (ecore_thread_check(th)) break;
}
}