Timing Managed Code in .NET 2.0

In .NET 1.1, we timed managed code by wrapping QueryPerformanceCounter and QueryPerformanceFrequency.  The following How To shows how:

In .NET 2.0, you can use the Stopwatch Class.  I found the following references useful:

Comments (5)

  1. DanielMoth says:

    FYI, anyone looking for it on the .NET Compact Framework will have to write their own or use the one on my blog.

  2. Swati says:

    Good infomation on Performance  counters , Thanks

  3. S Mathews says:

    Thanks. That was was very useful.

  4. afuvfo says:

    Hi! I used information from that site its great.


  5. gahodobefoda says:

    It was one of those perfect English autumnal days which occur more frequently in memory than in life