I'm using the Sleep() function in an EVC 4.0 project that I'm testing
on Pocket PC 2003 and Smartphone 2003 emulators. On both emulators a
call to Sleep(30000) takes 60 seconds to return instead of 30. Has
anyone seen this behavior before? Is it just something related to the
emulator, or should I plan for this same behavior on an actual device?

My app just runs in the background, so the fact that it really doesn't
do anything (even process messages) for 30 seconds isn't a big deal
for me, so I'd rather not complicate things by using other functions
such as WaitForSingleObjectEx, etc. (although who knows, I might
change the design in the future, but for now I'd like to learn about
this issue)

Re: Sleep() time doubled when using emulator by Chris

Chris
Tue Jun 24 19:26:48 CDT 2008

The emulators are just that - emulators. Their emulated clocks are very
poor as far as accuracy goes and should not be relied on for anything time
related. If you need an accurate timer, use real iron - there a 30 second
Sleep will take 30 seconds.

-Chris


<eselk2003@gmail.com> wrote in message
news:a11f30c9-7415-4cbb-b522-3432151e55f2@f36g2000hsa.googlegroups.com...
> I'm using the Sleep() function in an EVC 4.0 project that I'm testing
> on Pocket PC 2003 and Smartphone 2003 emulators. On both emulators a
> call to Sleep(30000) takes 60 seconds to return instead of 30. Has
> anyone seen this behavior before? Is it just something related to the
> emulator, or should I plan for this same behavior on an actual device?
>
> My app just runs in the background, so the fact that it really doesn't
> do anything (even process messages) for 30 seconds isn't a big deal
> for me, so I'd rather not complicate things by using other functions
> such as WaitForSingleObjectEx, etc. (although who knows, I might
> change the design in the future, but for now I'd like to learn about
> this issue)


Re: Sleep() time doubled when using emulator by eselk2003

eselk2003
Wed Jun 25 18:05:50 CDT 2008

On Jun 24, 5:26=A0pm, "Chris Tacke, MVP" <ctacke.at.opennetcf.dot.com>
wrote:
> The emulators are just that - emulators. =A0Their emulated clocks are ver=
y
> poor as far as accuracy goes and should not be relied on for anything tim=
e
> related. =A0If you need an accurate timer, use real iron - there a 30 sec=
ond
> Sleep will take 30 seconds.

Thanks, that is all I needed to know. As long as it will be correct
on a device, I can live with the differences on the emulator.