1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-23 22:51:02 +00:00

Duty/cycle improvement

This commit is contained in:
M66B 2022-02-01 23:37:56 +01:00
parent 826c67700e
commit ae8c33be45

View file

@ -60,12 +60,14 @@ public class DutyCycle {
if (busy + idle > interval) { if (busy + idle > interval) {
long wait = (duration - idle); long wait = (duration - idle);
Log.i(name + " busy=" + busy + " idle=" + idle + " wait=" + wait); Log.i(name + " busy=" + busy + " idle=" + idle + " wait=" + wait);
if (wait > 0) if (wait > 0) {
try { try {
Thread.sleep(wait); Thread.sleep(wait);
} catch (InterruptedException ex) { } catch (InterruptedException ex) {
Log.w(ex); Log.w(ex);
} }
last += wait;
}
idle = 0; idle = 0;
busy = 0; busy = 0;
} }