Example #1
0
 public DisposableWatch(StopWatch sw)
 {
     _sw = sw;
     _sw.Start();
 }
Example #2
0
 public void TestName()
 {
     string expected = "hoge";
     var sw = new StopWatch(expected);
     Assert.AreEqual(expected, sw.Name);
 }
Example #3
0
 public StopWatch GetStopWatch(string name)
 {
     if (!_stopWatches.ContainsKey(name))
         _stopWatches[name] = new StopWatch(name) { Now = Now };
     return _stopWatches[name];
 }
Example #4
0
 StopWatch Create(params DateTime[] dts)
 {
     var rec = new DateTimeRecoder(dts);
     var sw = new StopWatch("test");
     sw.Now = rec.Now;
     return sw;
 }
Example #5
0
 public DisposableWatch(StopWatch sw)
 {
     _sw = sw;
     _sw.Start();
 }