private delegate void AnyFunc(); private TimeSpan MeasureMe(AnyFunc f) { System.Diagnostics.Stopwatch stopWatch = new System.Diagnostics.Stopwatch(); stopWatch.Start(); f.Invoke(); stopWatch.Stop(); TimeSpan ts = stopWatch.Elapsed; return ts; }
Cheers!
1 comments:
StopWatch class is really a boon to those developer who are very much thoughtful about efficient execution of the program rather then writing just a working code.To improve total speed we may check methods speed separately and will come to know which method need to be optimized in terms of speed
digital signature
Post a Comment