Waiting a Certain Amount of Time : sleep « Threads « Ruby






Waiting a Certain Amount of Time

3.downto(1) { |i| puts "#{i}..."; sleep(1) }; puts "Go!"

 








Related examples in the same category

1.sleep for 1 second
2.Sleep amount of time
3.Sleep for less then a second.
4.Check the real interval between sleep