mirror of
https://github.com/M66B/FairEmail.git
synced 2026-05-18 13:08:16 +02:00
Duty/cycle improvement
This commit is contained in:
@@ -60,12 +60,14 @@ public class DutyCycle {
|
||||
if (busy + idle > interval) {
|
||||
long wait = (duration - idle);
|
||||
Log.i(name + " busy=" + busy + " idle=" + idle + " wait=" + wait);
|
||||
if (wait > 0)
|
||||
if (wait > 0) {
|
||||
try {
|
||||
Thread.sleep(wait);
|
||||
} catch (InterruptedException ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
last += wait;
|
||||
}
|
||||
idle = 0;
|
||||
busy = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user