diff options
author | Håvard Pettersen <havardpe@oath.com> | 2019-07-01 17:33:43 +0000 |
---|---|---|
committer | Håvard Pettersen <havardpe@oath.com> | 2019-07-01 17:33:43 +0000 |
commit | f3bf2f5b1a8b1dd1c244bb0df2d0c652959b557f (patch) | |
tree | 417bbdb86bfe09c69dc219d1c62779771b397ab5 /jrt/src | |
parent | b6241e25aaefb59ee9b0251ce7284175fe647592 (diff) |
use upper bound for current time estimate
Diffstat (limited to 'jrt/src')
-rw-r--r-- | jrt/src/com/yahoo/jrt/Scheduler.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/jrt/src/com/yahoo/jrt/Scheduler.java b/jrt/src/com/yahoo/jrt/Scheduler.java index ae5a827076e..4e81b79117d 100644 --- a/jrt/src/com/yahoo/jrt/Scheduler.java +++ b/jrt/src/com/yahoo/jrt/Scheduler.java @@ -61,7 +61,7 @@ class Scheduler { if (seconds < 0.0) { throw new IllegalArgumentException("cannot schedule a Task in the past"); } - int ticks = 1 + (int) Math.ceil(seconds * (1000.0 / TICK)); + int ticks = 2 + (int) Math.ceil(seconds * (1000.0 / TICK)); if (isActive(task)) { linkOut(task); } |