How to use StopWatch multiple times in C#?
I have short code that performs different operations and I want to measure
the time that takes to perform each. I read here about Stopwatch class,
and wanted to optimize my time measurements. my functions calls 5 others
functions and I want to measure each without declaring :
stopwatch sw1 = new stopwatch();
stopwatch sw2 = new stopwatch();
etc..
my function looks like that:
public bool func()
{
....
func1()
func2()
....
....
func5()
}
is there any way to measure the time using one stopwatch instance?
thanks!!
No comments:
Post a Comment