]> gitweb.factorcode.org Git - factor.git/commitdiff
Bugfix: Only reset-timer on mac if sleep-time returns an integer. If it returns...
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 15 Apr 2011 05:11:15 +0000 (00:11 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 15 Apr 2011 05:11:15 +0000 (00:11 -0500)
basis/core-foundation/run-loop/run-loop.factor

index 4a095f173c6cfec9a9da928ed26cd82032d470f5..22214cc9415a4fe900aa1695a9dd33a02e2f73b0 100644 (file)
@@ -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>