diff options
author | Orion Hodson <oth@google.com> | 2020-11-03 21:39:18 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-11-03 21:39:18 +0000 |
commit | 14872e6ceaafab1e9c683dd35610c90b8e5f5860 (patch) | |
tree | b75d389f23adf50dbbd62de334a7777e1733b177 | |
parent | 124fc8c96a196fa730e3098677b063e284de2922 (diff) | |
parent | 514ad4b0f61cc599ad197e901c536fdee954ed31 (diff) | |
download | vogar-14872e6ceaafab1e9c683dd35610c90b8e5f5860.tar.gz |
Vogar: stop busy waiting on tasks to time out am: 4ad7f448f9 am: a48faff89c am: 514ad4b0f6
Original change: https://android-review.googlesource.com/c/platform/external/vogar/+/1486097
Change-Id: I03a2e2cb3a73de1123610e70510d467a8cfb4385
-rw-r--r-- | src/vogar/commands/Command.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vogar/commands/Command.java b/src/vogar/commands/Command.java index dbd4daf..60c30b7 100644 --- a/src/vogar/commands/Command.java +++ b/src/vogar/commands/Command.java @@ -308,7 +308,7 @@ public final class Command { */ private abstract class TimeoutTask implements Runnable { public final void schedule() { - timer.schedule(this, System.nanoTime() - timeoutNanoTime, TimeUnit.NANOSECONDS); + timer.schedule(this, timeoutNanoTime - System.nanoTime(), TimeUnit.NANOSECONDS); } protected abstract void onTimeout(Process process); @@ -324,7 +324,7 @@ public final class Command { onTimeout(process); } else { // if the kill time has been pushed back, reschedule - timer.schedule(this, System.nanoTime() - timeoutNanoTime, TimeUnit.NANOSECONDS); + schedule(); } } } |