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