1
0

Timer Delta etwas gelockert

This commit is contained in:
2021-12-21 23:37:46 +01:00
parent 2206585652
commit a885f15ebb
2 changed files with 25 additions and 11 deletions

View File

@@ -126,8 +126,8 @@ namespace AMWD.Common.Tests.Utilities
Assert.IsFalse(delayedTask.IsWaitingToRun);
Assert.IsNull(delayedTask.Exception);
Assert.AreEqual(1, executionCount);
// delta of 50ms as the precision below 50ms is really bad for System.Timer
Assert.AreEqual(250, sw.ElapsedMilliseconds, 50);
// delta of 60ms as the precision below 50ms is really bad for System.Timer
Assert.AreEqual(250, sw.ElapsedMilliseconds, 60);
}
[TestMethod]
@@ -156,8 +156,8 @@ namespace AMWD.Common.Tests.Utilities
Assert.IsFalse(delayedTask.IsWaitingToRun);
Assert.IsNull(delayedTask.Exception);
Assert.AreEqual(0, executionCount);
// delta of 50ms as the precision below 50ms is really bad for System.Timer
Assert.AreEqual(1250, sw.ElapsedMilliseconds, 50);
// delta of 60ms as the precision below 50ms is really bad for System.Timer
Assert.AreEqual(1250, sw.ElapsedMilliseconds, 60);
Assert.IsFalse(isSuccess);
}
@@ -186,8 +186,8 @@ namespace AMWD.Common.Tests.Utilities
Assert.IsFalse(delayedTask.IsWaitingToRun);
Assert.IsNull(delayedTask.Exception);
Assert.AreEqual(1, executionCount);
// delta of 50ms as the precision below 50ms is really bad for System.Timer
Assert.AreEqual(50, sw.ElapsedMilliseconds, 50);
// delta of 60ms as the precision below 50ms is really bad for System.Timer
Assert.AreEqual(50, sw.ElapsedMilliseconds, 60);
Assert.IsTrue(isSuccess);
}