Skip to content

Instantly share code, notes, and snippets.

@masterzen
Created February 2, 2012 16:44
Show Gist options
  • Save masterzen/1724497 to your computer and use it in GitHub Desktop.
Save masterzen/1724497 to your computer and use it in GitHub Desktop.
equire 'thread'
def scroll
puts "In the thread!!"
end
thread = false
if thread
scroller = Thread.new do
loop do
scroll
sleep 1
end
end
end
a = Time.now
(1..100000).each do |i|
(1..1000).each do |j|
Math.sqrt(2)
end
end
puts "took: #{Time.now - a}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment