Ruby sleep or delay less than a second?

Posted by Joseph Silvashy on Stack Overflow See other posts from Stack Overflow or by Joseph Silvashy
Published on 2010-03-30T05:28:09Z Indexed on 2010/03/30 5:33 UTC
Read the original article Hit count: 283

Filed under:

So I'm making a script with ruby that must render frames at 24 frames per second, but I need to wait 1/24th of a second between sending the commands... how can I do that?

sleep seems to only wait in increments of 1 second or more.

update

Well ya you can do sleep 0.1 if you want, but is this the best way to delay in a ruby script?

© Stack Overflow or respective owner

Related posts about ruby