I'm want to benchmark my program with milliseconds resolution.
How do I get number of millisec between 2 times?

timespan.tostring returns only whole seconds on CF.
.net framework includes millisec.

Re: time resolution by Peter

Peter
Mon Jul 04 07:11:02 CDT 2005

If supported by your platform you can P/Invoke the QueryPerformanceCounter
API, or use the wrapper which is part of the OpenNETCF.Diagnostics.Stopwatch
class in the SDF - www.opennetcf.org/sdf/

Peter

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://www.peterfoot.net |
http://www.opennetcf.org

"Anonymous" <anonymous@noemail.com> wrote in message
news:uDfQTDJgFHA.1204@TK2MSFTNGP12.phx.gbl...
> I'm want to benchmark my program with milliseconds resolution.
> How do I get number of millisec between 2 times?
>
> timespan.tostring returns only whole seconds on CF.
> .net framework includes millisec.
>
>
>



Re: time resolution by ctacke/>

ctacke/>
Mon Jul 04 11:45:28 CDT 2005

Milliseconds are retrieved by calling Environment.TickCount. Sub-ms can be
gotten by P/Invoking QPC as Peter stated.

-Chris


"Anonymous" <anonymous@noemail.com> wrote in message
news:uDfQTDJgFHA.1204@TK2MSFTNGP12.phx.gbl...
> I'm want to benchmark my program with milliseconds resolution.
> How do I get number of millisec between 2 times?
>
> timespan.tostring returns only whole seconds on CF.
> .net framework includes millisec.
>
>
>