The StopWatch class is kind of a neat new class which lets you time things in a manner similar to a stop watch.  There was no simple way to time things in ASP.NET other than to keep tracks of Ticks and a start time, etc.  Now, to time how long something takes simply instantiate the StopWatch class and call the Start() method.  When you are finished timing simply call the Stop() method.  To get the time elapsed, access the Elapsed property.  This property will return a TimeSpan which you can use to get any sort of unit of time that you are interested in.
 
Here is a simple code example:
 
// instantiate the stopWatch
StopWatch stopWatch = new StopWatch();
 
// start the stopWatch
stopWatch.Start();
 
// do something that you want to time the duration of
 
// stop the stopWatch
stopWatch.Stop();
 
// get the time elapsed
TimeSpan timeSpan = stopWatch.Elapsed;
 
This class is not terribly exciting but it will make things like Average Time Performance Counters a little easier to implement.  This class is located in System.Diagnostics.

Read the complete post at http://www.dotnettipoftheday.com/blog.aspx?id=223