Skip to content

Instantly share code, notes, and snippets.

@dre-hh
Created April 12, 2018 20:11
Show Gist options
  • Save dre-hh/e3cef84e9d0d3517cd085a3257d723bc to your computer and use it in GitHub Desktop.
Save dre-hh/e3cef84e9d0d3517cd085a3257d723bc to your computer and use it in GitHub Desktop.
ruby round robin
#!/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