Example #1
0
 public void RestartExistingThatRuns()
 {
     var msw = new MultiStopwatch();
     msw.Start("test");
     Thread.Sleep(100);
     var elapsedBeforeRestart = msw.Elapsed("test");
     msw.Restart("test");
     var elapsedAfterRestart = msw.Elapsed("test");
     //this fails if Restart and Elapsed takes longer then 100ms, which can habben while debugging.
     Assert.Less(elapsedAfterRestart, elapsedBeforeRestart);
 }
Example #2
0
 public void RestartNotExisting()
 {
     var msw = new MultiStopwatch();
     msw.Restart("test");
 }