Re: Timer resolution

Tech-Archive recommends: Fix windows errors by optimizing your registry



You can set resolution to 1 mscek with Multimedia Timers(
timeBeginPeriod()/timeEndPeriod()) in desktop windows but that will not be
stable 1 msec so the better way to receive such is to use RT os like windows
CE where default resolution is 1 msec and not
10(15) as in desktop , obviously you can change that too if you build your
own BSP.
Arkady

"GrahamH" <pknvdw@xxxxxxxxxxxxx> wrote in message
news:8sRXe.8210$1A.1767@xxxxxxxxxxxxxxxxxxxxxxx
>
> <440gtx@xxxxxxxxx> wrote in message
> news:1127204725.482902.239760@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>>> Do multiprocessor machines really use rdtsc for
>>>> KeQueryPerformanceCounter?
>>>
>>> Yes. Actually, any machine with a multiprocessor HAL
>>
>> Do you by chance know how power management is handled where the CPU
>> clock is reduced or increased? It seems there are two ways to go. Do
>> the units change (i.e. PerformanceFrequency returned from
>> KeQueryPerformanceCounter) or does it internally keep the units the
>> same by interpolating the rdtsc value? And unless each power level
>> transition happens at exactly the same instant on every cpu it seems
>> like different processors could start getting out of rdtsc step in a
>> hurry.
>>
>
> Thanks for all the input so far, but I'm still not clear how best to get
> real GMT time to 1ms resolution.
>
> I would still love to know what to expect of KeQueryInterruptTime, 1ms,
> 100us, 100ns ?? "Suitable for fine-grained timing" says MSDN! And how best
> to get real system time with 1ms resolution (my real goal). I have
> something running now that calls KeQuerySystemTime and
> KeQueryPerformanceCounter once when the driver first completes a frame
> capture. Thereafter it calculates the time interval from initialisation to
> now using KeQueryPerformanceCounter and adds this value, scaled to 100ns
> units, to the initial system time. But can I be sure that my clock will
> stay in-synch with system time over long periods? I can detect a loss of
> synch and re-initialise but that will cause a glitch in my frame to frame
> timing. I also have the inconvenience of dividing the count by the
> frequency and scaling to 100ns units. That needs more than 64 bit integer
> arithmetic.
> It looks like it might be better to increase the system tick rate to 1kHz
> with ExSetTimerResolution. Then any KeQuerySystemTime call will give me
> the desired resolution directly (I assume). But I don't really want all
> timer activity to increase tenfold.
>
> Help!
>
> Graham
>


.



Relevant Pages

  • Re: Real time clock with millisecond resolution
    ... Please forgive me for my newbie question. ... time to be in millisecond resolution. ... system time to get a high resolution calendar time. ...
    (microsoft.public.vc.language)
  • W32Time Event Type: Warning
    ... resolution is not relevant because I'm XP SP2 with all recommended update ... The time service has not been able to synchronize the system time for 49152 ... time stamp. ...
    (microsoft.public.windowsxp.general)
  • Re: High resolution timer on kernel mode
    ... Please suggest me kernel mode api for high resolution time. ... I read that keQueryPerformanceCounter is high performance counter but it ...
    (microsoft.public.development.device.drivers)
  • Re: Get system time in Milliseconds
    ... GetTickCountor performance counters. ... state you shouldn't count on these functions for sub-second resolution. ... the time of another with accuracy upto milliseconds. ... suggest any alternatives how to get system time with actual milliseconds. ...
    (microsoft.public.windowsce.app.development)
  • Min Time Resolution on Windows
    ... We are facing problem in calculating time stamps at driver level. ... By using keQueryPerformanceCounter (along with ExSetTimerResolution which ... changes frequency at which clock interrupts)we can get resolution of min. ...
    (microsoft.public.development.device.drivers)