Skip to content

Commit 9286175

Browse files
committed
fix calculation of remaining delay for serial background tasks
1 parent d397480 commit 9286175

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • AndroidAnnotations/androidannotations-core/androidannotations-api/src/main/java/org/androidannotations/api

‎AndroidAnnotations/androidannotations-core/androidannotations-api/src/main/java/org/androidannotations/api/BackgroundExecutor.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ private void postExecute() {
426426
if (next != null) {
427427
if (next.remainingDelay != 0) {
428428
/* the delay may not have elapsed yet */
429-
next.remainingDelay = Math.max(0L, targetTimeMillis - System.currentTimeMillis());
429+
next.remainingDelay = Math.max(0L, next.targetTimeMillis - System.currentTimeMillis());
430430
}
431431
/* a task having the same serial was queued, execute it */
432432
BackgroundExecutor.execute(next);

0 commit comments

Comments
 (0)