Forum: Ruby delay

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
TURK (Guest)
on 2006-03-11 16:25
HI masters,
I want to create a loop say :

while (i>=0)
 // do something
 Now hang for two seconds for next iteration

How would you hang the process in ruby for a certain time?
thank you
Daniel H. (Guest)
on 2006-03-11 16:29
(Received via mailing list)
On Mar 11, 2006, at 3:25 PM, TURK wrote:

> thank you
> --
> Posted via

Use Kernel#sleep

-- Daniel
This topic is locked and can not be replied to.