Stopwatch is a litle class in the Diagostics namespace wich is very handy for detecting the bottlenecks in time consuming processes.

Get the elapsed time..

Normally I measured the elapsed time with something like this:

            DateTime start = DateTime.Now;
            // Do some processing
            DateTime end = DateTime.Now;
            TimeSpan elapsedTime = end.Subtract(start);
            MessageBox.Show(elapsedTime.ToString());

With the StopWacht class this is getting a litle easier, like this:

            Stopwatch stopwatch = new Stopwatch();
            stopwatch.Start();
            // Do some processing
            MessageBox.Show(stopwatch.Elapsed.ToString());
            // Do some more processing
            MessageBox.Show(stopwatch.Elapsed.ToString());

So now it's easyer to messure the elapsed time of specific processes!

{{opmerking.Naam}}:

{{opmerking.OpmerkingText}}

            

Saving your comment....

Naam is verplicht!
Email is verplicht!
Opmerking is verplicht!