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);
}

View File

@@ -4,20 +4,34 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased](https://git.am-wd.de/AM.WD/common/compare/v1.1.0...master)
## [Unreleased](https://git.am-wd.de/AM.WD/common/compare/v1.3.0...master) - 0000-00-00
### Added
### Changed
- Enhanced Stopwatch/Timer delta due to unsharp resolution using timers
## [v1.3.0](https://git.am-wd.de/AM.WD/common/compare/v1.2.0...v1.3.0) - 2021-12-21
### Added
- `BasicAuthenticationHandler` to use instead of other handlers (instead of e.g. CookieAuthentication)
- `BasicAuthenticationAttribute` to restrict single actions
### Changed
- Simplified package references on AspNetCore
- Changed NuGet package `DnsClient` to `DNS`
## [v1.2.0](https://git.am-wd.de/AM.WD/common/compare/v1.1.0...v1.2.0) - 2021-12-19
### Added
- CHANGELOG
- `HtmlHelper.IsDarkColor` to classify a color as dark or light one (by luminance)
- `ReadLine` and `ReadLineAsync` as `StreamExtensions`
- `BasicAuthenticationHandler` to use instead of other handlers (instead of e.g. CookieAuthentication)
- `BasicAuthenticationAttribute` to restrict single actions
### Changed
- Unit-Tests enhanced
- Unit-Tests excluded from code coverage calcualtion
- Updated NuGet package `NetRevisionTask`
- Changed NuGet package `DnsClient` to `DNS`
## [v1.1.0](https://git.am-wd.de/AM.WD/common/compare/v1.0.2...v1.1.0) - 2021-11-22