From a744e3a3707458e38a6908faf74aab3bef07b04d Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 15 Apr 2011 00:11:15 -0500 Subject: [PATCH] Bugfix: Only reset-timer on mac if sleep-time returns an integer. If it returns f, don't divide by 1000 and error. --- basis/core-foundation/run-loop/run-loop.factor | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/basis/core-foundation/run-loop/run-loop.factor b/basis/core-foundation/run-loop/run-loop.factor index 4a095f173c..22214cc941 100644 --- a/basis/core-foundation/run-loop/run-loop.factor +++ b/basis/core-foundation/run-loop/run-loop.factor @@ -105,7 +105,9 @@ TUPLE: run-loop fds sources timers ; >CFAbsoluteTime CFRunLoopTimerSetNextFireDate ; : reset-timer ( timer -- ) - sleep-time 1000 /f system-micros + (reset-timer) ; + sleep-time dup + [ 1000 /f system-micros + (reset-timer) ] + [ 2drop ] if ; PRIVATE>