[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

huseyin polat

3/11/2006 2:25:00 PM

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

--
Posted via http://www.ruby-....


1 Answer

Daniel Harple

3/11/2006 2:28:00 PM

0

On Mar 11, 2006, at 3:25 PM, TURK wrote:

> 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
>
> --
> Posted via http://www.ruby-....
>

Use Kernel#sleep

-- Daniel