TeeZards 0 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?
Nuclear Nezz 2105 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
TeeZards 0 Author 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)
Pandemic 2853 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.