Page 1 of 1

Waiting without Sleep() possible?

PostPosted: Mar 8, 2004 @ 1:34pm
by efortier

PostPosted: Mar 8, 2004 @ 2:06pm
by Pejo Software - Per
I think your only option is to do busy waiting and use a performance counter.

PostPosted: Mar 8, 2004 @ 3:01pm
by Dan East

PostPosted: Mar 8, 2004 @ 4:38pm
by Pejo Software - Per
In Windows CE >= 3 the accuracy of Sleep should be 1-2 ms. On a PC it is not that good.

I did some tests on a Cassiopeia E-115 Pocket PC and on that device Sleep(1) would mean sleeping in 20 ms. This is the behaviour that devices < Windows CE 3 would have, but all modern devices will probably have good Sleep accuracy.

PostPosted: Mar 11, 2004 @ 1:08pm
by fyf

PostPosted: Mar 11, 2004 @ 1:43pm
by efortier

PostPosted: Mar 12, 2004 @ 8:09am
by fyf
Using socket select command to realize Sleep has some unwanted influence to power monitoring and clock counter registers.
And using GetTickCount is more correct.

PostPosted: Mar 12, 2004 @ 2:03pm
by efortier

PostPosted: Mar 12, 2004 @ 3:10pm
by Presto