469,314 Members | 2,240 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,314 developers. It's quick & easy.

System.Diagnostics.Stopwatch reliablity

Hello

I am wanting to use the high accuracy of System.Diagnostics.Stopwatch
to get the current time using GetTimeSpan.

Underneath, System.Diagnostics.Stopwatch.GetTimeStamp uses the win32
API QueryPerformanceCounter which has a reliability issue and can jump
forward unexpectedly (http://support.microsoft.com/kb/274323). Does
System.Diagnostics.Stopwatch.GetTimeStamp take this issue into
consideration and perform a check with GetTickCount?

I am considering using win32 TimeGetTime which is accurate to 1ms
(http://gpwiki.org/index.php/VB:Timers), but would prefer to use the
managed System.Diagnostics.Stopwatch if possible.

Many thanks

Paul
Nov 23 '07 #1
0 2855

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by David Conorozzo | last post: by
4 posts views Thread by Jiho Han | last post: by
4 posts views Thread by PlusNet | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.