summaryrefslogtreecommitdiffstats
path: root/jrt/src/com/yahoo/jrt/Scheduler.java
diff options
context:
space:
mode:
Diffstat (limited to 'jrt/src/com/yahoo/jrt/Scheduler.java')
-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);
}