Re: Regarding time resolution in microsecond

"Rajat" <Rajat@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> Hi All,
> Could any body point out, how to get time in microsecond precision. As if
> use, timeBeginPeriod(1) also it will provide a resolution of 1
> 1000 microsecond). Is there any way to get this resolution of 1
> or atleast
> 20 microsecond.
> Any pointer will be help full.
> Thanks in advance.

QueryPerformanceCounter often gives sub-microsecond accuracies. You need to
call QueryPerformanceFrequency to get the exact value of the timing
interval. Start at

If your interest is in timing of code, then look at "How To Use
QueryPerformanceCounter to Time Code" at

or "How To: Time Managed Code Using QueryPerformanceCounter and
QueryPerformanceFrequency" at



Relevant Pages

  • Re: QueryPerformanceCounter
    ... Windows is not a real-time system, ... cannot operate on a microsecond level. ... QueryPerformanceCounter reads the PIT interval ... actually take multiple microseconds to run. ...
  • Re: how do I know how long my function call took?
    ... experiment and we would like to know how much time the calling function takes. ... The specs say this should happen on the order of a microsecond, which is faster than we need. ... I have tried looking at the C FAQ and Google to find something that would give me better resolution, ... It's also worth asking one of the windows programming newsgroups. ...
  • Re: timing VBA execution
    ... Not sure 10 milliseconds is enough resolution, ... > OSAX is Open Scripting Architecture eXtension - also called a Scripting ... > Since the PowerPC has a microsecond timer available, ...
  • Re: now.ticks does not work
    ... Willie. ... that can change the outcome of the timing. ... > | i will check out your QueryPerformanceCounter ... > |> Tickcount has a resolution of microseconds. ...
  • Re: now.ticks does not work
    ... Willie, ... that can change the outcome of the timing. ... | i will check out your QueryPerformanceCounter ... |> QueryPerformanceCounter has a resolution of nanoseconds or smaller (its ...