Re: Counting milliseconds on PPC
From: Paul G. Tobey [eMVP] (ptobey)
Date: 11/29/04
- Next message: Darren Shaffer: "Re: Exception error with XmlTextReader"
- Previous message: Jatin Sethi: "Adding and Removing Assemblies to the CF GAC"
- In reply to: Thomas Taylor: "Re: Counting milliseconds on PPC"
- Next in thread: Alex Feinman [MVP]: "Re: Counting milliseconds on PPC"
- Reply: Alex Feinman [MVP]: "Re: Counting milliseconds on PPC"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 29 Nov 2004 11:46:50 -0700
GetTickCount shouldn't suffer from that. As Chris indicated, only some sort
of external, battery-operated timer, is going to run when the device is
'off'.
Paul T.
"Thomas Taylor" <thomas@community.nospam> wrote in message
news:u$F6C%23j1EHA.2624@TK2MSFTNGP11.phx.gbl...
> Thanks Paul, I looked back at the documentation, and the point about
> 0.5-second accuracy comes from the Framework documentation for
> System.Environment.TickCount
> (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html
> /frlrfsystemenvironmentclasstickcounttopic.asp), which states "The
> resolution of the TickCount property cannot be less than 500
> milliseconds."
> Perhaps this is a fudge factor for the managed environment to get the
> count?
>
> The practical reason for needing to keep counting when the device is off
> is
> that users may want to time events that last longer than their
> auto-suspend
> time. One could easily start the stopwatch and have the device turn
> itself
> off in the middle of the event.
>
> From a programming standpoint, I would not really need it to keep counting
> while it is off if, for example, I could save the start time (e.g., if
> DateTime.Now gave milliseconds) and then compute the elapsed time any time
> later, including after the device had been turned off and back on.
>
> Thomas
>
> "Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com>
> wrote in message news:u4hq#hj1EHA.3416@TK2MSFTNGP09.phx.gbl...
>> 2) I don't see anywhere that the accuracy is only 0.5s. Certainly, on
>> our
>> devices, the resolution is 1ms and the accuracy is pretty good, unless a
>> misbehaving driver has been installed and is disabling the timer
>> interrupt
>> for long periods of time.
>>
>> If you're going to have to keep counting when the device is off, I think
>> you're *completely* out of luck. Why would a Pocket PC device want to
>> use
>> battery, even when off, to count something that 99.99% of all people care
>> nothing about? You'd need special hardware to maintain the count while
> the
>> power was off, battery-backed hardware.
>>
>> Paul T.
>
>
- Next message: Darren Shaffer: "Re: Exception error with XmlTextReader"
- Previous message: Jatin Sethi: "Adding and Removing Assemblies to the CF GAC"
- In reply to: Thomas Taylor: "Re: Counting milliseconds on PPC"
- Next in thread: Alex Feinman [MVP]: "Re: Counting milliseconds on PPC"
- Reply: Alex Feinman [MVP]: "Re: Counting milliseconds on PPC"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|