Forum: Ruby delay

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community 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
i-=i
}

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 http://www.ruby-forum.com/.
>

Use Kernel#sleep

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