about summary refs log tree commit homepage
path: root/lib/rainbows/fiber
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-06-18 08:10:00 +0000
committerEric Wong <normalperson@yhbt.net>2010-06-18 08:10:00 +0000
commitb5a24fdbf928b675e478987393212651ef5909d6 (patch)
tree704074c5a616a9fa9d4e006693074e3286687c86 /lib/rainbows/fiber
parentfd1ec829c8c941143c8ae70b18e51838bc51da73 (diff)
downloadrainbows-b5a24fdbf928b675e478987393212651ef5909d6.tar.gz
Not that many people will actually call Rainbows.sleep
outside of tests...
Diffstat (limited to 'lib/rainbows/fiber')
-rw-r--r--lib/rainbows/fiber/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rainbows/fiber/base.rb b/lib/rainbows/fiber/base.rb
index 54f797b..ee9e68e 100644
--- a/lib/rainbows/fiber/base.rb
+++ b/lib/rainbows/fiber/base.rb
@@ -61,13 +61,13 @@ module Rainbows
         ZZ.delete_if { |fib, time|
           if now >= time
             fibs << fib
-            now = Time.now
           else
             max = time
             false
           end
         }
         fibs.each { |fib| fib.resume }
+        now = Time.now
         max.nil? || max > (now + 1) ? 1 : max - now
       end