Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
delay
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
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
delay
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password