diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-06-18 08:10:00 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-06-18 08:10:00 +0000 |
commit | b5a24fdbf928b675e478987393212651ef5909d6 (patch) | |
tree | 704074c5a616a9fa9d4e006693074e3286687c86 | |
parent | fd1ec829c8c941143c8ae70b18e51838bc51da73 (diff) | |
download | rainbows-b5a24fdbf928b675e478987393212651ef5909d6.tar.gz |
Not that many people will actually call Rainbows.sleep outside of tests...
-rw-r--r-- | lib/rainbows/fiber/base.rb | 2 |
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 |