diff options
-rw-r--r-- | cli/ops/timers.rs | 2 | ||||
-rw-r--r-- | js/timers.ts | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/cli/ops/timers.rs b/cli/ops/timers.rs index 46217a188..abcd5c1b3 100644 --- a/cli/ops/timers.rs +++ b/cli/ops/timers.rs @@ -33,7 +33,7 @@ pub fn op_global_timer( let state = state; let mut t = state.global_timer.lock().unwrap(); - let deadline = Instant::now() + Duration::from_millis(val as u64); + let deadline = Instant::now() + Duration::from_millis(val); let f = t .new_timeout(deadline) .then(move |_| futures::future::ok(json!({}))); diff --git a/js/timers.ts b/js/timers.ts index ff8df9a6b..5bc4922e3 100644 --- a/js/timers.ts +++ b/js/timers.ts @@ -138,8 +138,8 @@ function fire(timer: Timer): void { function fireTimers(): void { const now = getTime(); - // Bail out if we're not expecting the global timer to fire (yet). - if (globalTimeoutDue === null || now < globalTimeoutDue) { + // Bail out if we're not expecting the global timer to fire. + if (globalTimeoutDue === null) { return; } // After firing the timers that are due now, this will hold the due time of |