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) {
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;
}