Sleep amount of time : sleep « Threads « Ruby






Sleep amount of time


Time.new                     # => Sat Mar 18 21:17:58 EST 2006
sleep(10)
Time.new                     # => Sat Mar 18 21:18:08 EST 2006
sleep(1)
Time.new                     # => Sat Mar 18 21:18:09 EST 2006

 








Related examples in the same category

1.sleep for 1 second
2.Waiting a Certain Amount of Time
3.Sleep for less then a second.
4.Check the real interval between sleep