aboutsummaryrefslogtreecommitdiffstats
path: root/jrt
diff options
context:
space:
mode:
authorArne H Juul <arnej27959@users.noreply.github.com>2019-07-01 16:39:28 +0200
committerGitHub <noreply@github.com>2019-07-01 16:39:28 +0200
commitb6241e25aaefb59ee9b0251ce7284175fe647592 (patch)
tree6b114ed02f3610f274a8c692416f01a3c5bfcfd1 /jrt
parent6ff34be2071fac5bc838cc3d2f9deb36170f9ab1 (diff)
parent18384705a5e7426a2c808a37f3c1e216dcb6ebd4 (diff)
Merge pull request #9935 from vespa-engine/havardpe/improve-small-rpc-timeouts
round -> ceil to avoid premature timeout
Diffstat (limited to 'jrt')
-rw-r--r--jrt/src/com/yahoo/jrt/Scheduler.java2
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 57b5ac43cea..ae5a827076e 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) (seconds * 10.0 + 0.5);
+ int ticks = 1 + (int) Math.ceil(seconds * (1000.0 / TICK));
if (isActive(task)) {
linkOut(task);
}