Re: Counting milliseconds on PPC

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Paul G. Tobey [eMVP] (ptobey)
Date: 11/29/04


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.
>
>



Relevant Pages

  • Re: Counting milliseconds on PPC
    ... you can have a stopwatch functionality. ... >> the device actually counting milliseconds between power-off and ... >>> Paul T. ... The practical reason for needing to keep counting when the device is ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Tuesday Still Shots 12/13/05
    ... >I'm not sure what made it SJP's reaction to the swearing or Paul ... >getting in the "counting your Everybody Loves Raymond residuals, ... >syndication version." ...
    (alt.fan.letterman)
  • Re: WINCE .NET 4.2/Accelent
    ... SYSINTR_NETWORK out of nkintr.h and recompiling your platform to see if ... someone else is counting on that definition and needs to have oalintr.h ... >>Paul T. ...
    (microsoft.public.windowsce.platbuilder)