Last active
January 2, 2016 10:09
-
-
Save doxavore/8288495 to your computer and use it in GitHub Desktop.
Timers 2.0.0 on JRuby 1.7.4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> require 'timers' | |
true | |
>> timers = Timers.new | |
#<Timers:0x322114c1 @interval=#<Hitimes::Interval:0x19d9a49d>, @timers=#<SortedSet: {}>, @paused_timers=#<SortedSet: {}>> | |
>> timer = timers.after(5) { puts 'hello' } | |
#<Timers::Timer:81e fires in 4.995706082 seconds> | |
# ... never fires | |
# Also, this doesn't seem to work, from the specs: | |
>> fired = false | |
false | |
>> timer = timers.after(5) { fired = true } | |
#<Timers::Timer:9a8 fires in 4.999 seconds> | |
>> timer | |
#<Timers::Timer:9a8 fired 2.64 seconds ago> | |
>> fired | |
false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment