public void DeltaTime10Hz() { DeltaTime t = new DeltaTime(); for(int i = 0; i < TestRepeats; i++) { Util.AccurateWaitMilliseconds(100); Assert.AreEqual(0.1, t.Value, Error); } }
public void DeltaTimeManualTest() { DeltaTime t = new DeltaTime(); t.Value = 0.01; for(int i = 0; i < TestRepeats; i++) { Assert.AreEqual(0.01, t.Value, double.Epsilon); } t.Value = -1; for(int i = 0; i < TestRepeats; i++) { Util.AccurateWaitSeconds(0.01); Assert.AreEqual(0.01, t.Value, Error); } }