public void Reset() { var clock = new ManualClock(); clock.Start(); clock.Update(new TimeSpan(100000)); clock.Reset(); Assert.IsFalse(clock.IsRunning); Assert.AreEqual(TimeSpan.Zero, clock.DeltaTime); Assert.AreEqual(TimeSpan.Zero, clock.GameTime); Assert.AreEqual(TimeSpan.Zero, clock.TotalTime); clock.Start(); clock.Update(new TimeSpan(100000)); clock.Stop(); clock.Reset(); Assert.IsFalse(clock.IsRunning); Assert.AreEqual(TimeSpan.Zero, clock.DeltaTime); Assert.AreEqual(TimeSpan.Zero, clock.GameTime); Assert.AreEqual(TimeSpan.Zero, clock.TotalTime); }
public void Reset() { var clock = new ManualClock(); clock.Start(); clock.Update(new TimeSpan(100000)); clock.Reset(); Assert.IsFalse(clock.IsRunning); Assert.AreEqual(TimeSpan.Zero, clock.DeltaTime); Assert.AreEqual(TimeSpan.Zero, clock.GameTime); Assert.AreEqual(TimeSpan.Zero, clock.TotalTime); clock.Start(); clock.Update(new TimeSpan(100000)); clock.Stop(); clock.Reset(); Assert.IsFalse(clock.IsRunning); Assert.AreEqual(TimeSpan.Zero, clock.DeltaTime); Assert.AreEqual(TimeSpan.Zero, clock.GameTime); Assert.AreEqual(TimeSpan.Zero, clock.TotalTime); }