Timing mystery

Why would the performance profiler show 839 ms for line 1 and 1000 ms for line 6? The profiler is set to wall clock time.

I am using ANTS Performance Profiler 7.0 downloaded last week on Windows XP, Visual Studio 2010, and C# code.

1 int n = TestSleep(1000);
2 Debug.WriteLine(string.Format("n: {0}", n));
3}

4private int TestSleep(int ms)
5{
6 Thread.Sleep(ms);
7 return 123;
8}

Thank you for your help.
Olaf
[/url]

Comments

Sign In or Register to comment.