I have a old and legacy web application build on .NET 1.1 .In that application I have shown as web page as pop up . I have a seperate method to show the data in that pop up.I want to find the execution time of that method.As we know the stopwatch is not present in .NET 1.1. I have tried using the DateTime.As I have gone through some sites this process of execution counter not correct.Can any once help me regarding this?
Asked
Active
Viewed 969 times
1 Answers
0
Jeff Atwood, of CodingHorror fame, provided a good implementation of a Stopwatch class for .NET 1.1, it's worth looking at: http://www.codinghorror.com/blog/2005/12/a-stopwatch-class-for-net-11.html
If your method is long-running and you only need something accurate to the nearest 10-millisecond or so, then you could get-away with using DateTime.UtcNow.Subtract( startTime ).TotalMiliseconds
but don't depend on it for accurate reporting.

Dai
- 141,631
- 28
- 261
- 374