Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Sleep function


    TeeZards

    Recommended Posts

    Using sleep() you can get like 1,235 second sleep time, but what i want to achieve is to make it so it sleeps for like 1,23567281 seconds (more digits after comma) is it possible?

    Link to comment
    Share on other sites

    you can sleep for as long as you want. The method takes an int, so you're limited to whatever 32 bits is, 2,147,483,647

    If you need to sleep for longer than that, then just

    sleep(2147483647)

    sleep(2147483647)

     

    But if you're sleeping for that long I would question what you're doing, and how to do it a different way :P

    Link to comment
    Share on other sites

    You got it wrong, i need to add more digits after 1,..... so its like 1 second and few thousand miliseconds

     

    1000  = 1s

    1230 = 1,230s

     

    what i want is something like 1,234595s (more digits after comma)

    Link to comment
    Share on other sites

    The sleep method uses milliseconds, so sleep(500) = 0.5s, 100 = 0.1s 6 = 0.006s, etc.

     

    1.234s would be sleep(1234)

     

    If you need more precise than that then I have no clue what you're doing haha :P

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.