Anyone else experience problems with calling sleep with longer time lengths?
For example, sleep 500.0 will cause a delay much shorter than 500s.
Is there an upper limit?
Sleep issues
Re: Sleep issues
Yes. If you look at sleep() it takes an unsigned integer - 16 bits. Each tick is 1/512 of a second. Therefore the maximum sleep time is 65536/512 = 128 seconds.pjc30943 wrote:For example, sleep 500.0 will cause a delay much shorter than 500s.
Is there an upper limit?
Mike Perks
Re: Sleep issues
Ah. Of course... Thank you.mikep wrote: Yes. If you look at sleep() it takes an unsigned integer - 16 bits. Each tick is 1/512 of a second. Therefore the maximum sleep time is 65536/512 = 128 seconds.