Sleep for less then a second. : sleep « Threads « Ruby






Sleep for less then a second.

puts Time.new.usec                        # => 377185
sleep(0.1)
puts Time.new.usec                        # => 479230

 








Related examples in the same category

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