Created
April 12, 2018 20:11
-
-
Save dre-hh/e3cef84e9d0d3517cd085a3257d723bc to your computer and use it in GitHub Desktop.
ruby round robin
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
#!/usr/bin/env ruby | |
heartbit = Thread.new do | |
prev_time = Time.now | |
while true | |
sleep 1 | |
current_time = Time.now | |
puts "#{current_time - prev_time} seconds passed" | |
end | |
end | |
puts (2..100_000).reduce { |r, n| r*n} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment