From a885f15ebb13752efcdc898aa272ea4208c32e15 Mon Sep 17 00:00:00 2001 From: Andreas Mueller Date: Tue, 21 Dec 2021 23:37:46 +0100 Subject: [PATCH] Timer Delta etwas gelockert --- .../Utilities/DelayedTaskTests.cs | 12 +++++----- CHANGELOG.md | 24 +++++++++++++++---- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/AMWD.Common.Tests/Utilities/DelayedTaskTests.cs b/AMWD.Common.Tests/Utilities/DelayedTaskTests.cs index 4bd8bbe..3023e8a 100644 --- a/AMWD.Common.Tests/Utilities/DelayedTaskTests.cs +++ b/AMWD.Common.Tests/Utilities/DelayedTaskTests.cs @@ -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); } diff --git a/CHANGELOG.md b/CHANGELOG.md index 05b4df3..2c1203a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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