Timing mystery

Code profiling for .NET developers.

Moderators: AndrewH, melvyn.harbour, james.billings, Laura Morley, dene.boulton

Timing mystery

Postby OlafMeding » Tue Feb 21, 2012 12:00 am

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]
OlafMeding
 
Posts: 3
Joined: Tue Jan 25, 2011 5:19 pm

Postby Chris.Allen » Fri Feb 24, 2012 2:23 pm

That's rather odd - I just tried it and got, respectively:

1000.240 ms

&

1000.027

Feel free to send your results to us at support and we'll take a look.
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm


Return to ANTS Performance Profiler 7

Who is online

Users browsing this forum: No registered users and 0 guests