Skip to content

Instantly share code, notes, and snippets.

@eric-wood
Last active August 29, 2015 14:11
Show Gist options
  • Save eric-wood/34a37e240e8c6d4333a7 to your computer and use it in GitHub Desktop.
Save eric-wood/34a37e240e8c6d4333a7 to your computer and use it in GitHub Desktop.
timing
timer = Thread.new do
Thread.current[:delay] = 1
loop do
sleep(Thread.current[:delay])
puts "boom! #{Thread.current[:delay]}"
end
end
sleep(3)
timer[:delay] = 2
sleep(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment