TeeZards 0 Share Posted January 6, 2016 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 More sharing options...
Nuclear Nezz 2059 Share Posted January 6, 2016 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 Link to comment Share on other sites More sharing options...
TeeZards 0 Author Share Posted January 6, 2016 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 More sharing options...
IcCookies 24 Share Posted January 7, 2016 You could've just put 1.1234s .... Link to comment Share on other sites More sharing options...
Pandemic 2789 Share Posted January 7, 2016 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.