| Author |
Message |
pjc30943
Joined: 02 Dec 2005
|
|
Posted: 05 February 2008, 4:57 AM Post subject: Sleep issues |
|
|
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? |
|
| Back to top |
|
 |
mikep
Joined: 24 Sep 2005
Location: Austin, TX
|
|
Posted: 05 February 2008, 5:28 AM Post subject: Re: Sleep issues |
|
|
| pjc30943 wrote: | For example, sleep 500.0 will cause a delay much shorter than 500s.
Is there an upper limit? |
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. |
|
| Back to top |
|
 |
pjc30943
Joined: 02 Dec 2005
|
|
Posted: 05 February 2008, 5:51 AM Post subject: Re: Sleep issues |
|
|
| 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. |
Ah. Of course... Thank you. |
|
| Back to top |
|
 |
|