Repository navigation
Releases
v3.0.0
What's Changed
Breaking Changes
Start()on a disposed timer now throws anObjectDisposedExceptionsynchronously. Previously this was undefined behavior and could crash the whole process.- The timer constructors no longer throw
InvalidOperationException: kernel resources are created per run insideStart(), which now documents that exception instead. A failing resource creation leaves the timer stopped instead of half-constructed. - The default
SleepThreshold/YieldThresholdof theHighResQuickTickTimerare now platform dependent (Windows 1.5 / 0.75 ms, Linux 0.5 / 0.3 ms, others e.g. macOS 15 / 0.75 ms) instead of a fixed 1.5 / 0.75 ms. Explicitly set values behave as before; the allowed minimum forSleepThresholdwas
lowered from 1.0 to 0.5 ms.
Library Changes
- Removed the IOCP machinery: the timer now waits on the high-resolution timer handle directly. The Go-style completion port routing the implementation was originally based on is not needed in .NET by @Uight in #68
- Fixed the
Stop()/Dispose()lifecycle: a deadlock whenStop()raced anElapsedhandler that itself callsStop()/Dispose(), theStart()-after-Dispose()process crash, and missing disposed guards. EveryStart()now owns its kernel resources per run and the worker thread releases them
itself, so runs can no longer interfere with each other by @Uight in #69 - Reworked the sleep logic of the
HighResQuickTickTimerby @Uight in #70:- Each run now caches one kernel timer instead of creating and destroying a handle for every 0.4 ms sleep
- Long intervals are slept in a single interruptible block until shortly before the deadline — one wakeup instead of hundreds per tick, with unchanged timing behavior near the deadline
- On Linux the timer now sleeps via
clock_nanosleepon the monotonic clock (overshoot of only tens of microseconds) instead ofThread.Sleep(1), drastically reducing CPU usage at equal or better accuracy and enabling the new sub-millisecond default thresholds
- Fixed
Stopwatchticks andTimeSpanticks being mixed up in internal conversions; all conversions are now explicit by @Uight in #59 QuickTickTiming.Delayno longer runs task continuations synchronously on the timer/cancellation callback thread by @Uight in #61- Several smaller fixes by @Uight in #63:
- Timers no longer throw a confusing
TypeInitializationExceptionon Windows versions older than 10 (1803) — the realPlatformNotSupportedExceptionsurfaces at the point of use - The
Elapsedevent is now thread-safe against concurrent subscribe/unsubscribe - Long intervals (hours+) no longer lose millisecond precision due to
floatstorage - Symbol packages (
.snupkg) are now actually published and SourceLink was added for step-through debugging - Fixed the NuGet package description to mention all supported target frameworks
- Timer worker threads are now named
"QuickTick Timer"for easier debugging
- Timers no longer throw a confusing
Documentation & Reports
- The README now documents the exceptions of every public method as well as the new sleep behavior and per-platform defaults
- Updated performance reports to 3.0 for Windows Server 2025 and Ubuntu 24.04.4 (both .NET 10.0)
Dependency & Tooling Updates
Note: These dependency updates only affect tooling/testing projects and are not part of the released QuickTick library package.
- Bump SkiaSharp by @dependabot[bot] in #56
- Bump actions/checkout from 6 to 7 by @dependabot[bot] in #53
- Bump Microsoft.NET.Test.Sdk from 18.5.1 to 18.7.0 by @dependabot[bot] in #54
- Bump NUnit from 4.6.0 to 4.6.1
- Bump QuestPDF from 2026.5.0 to 2026.7.0
Full Changelog: v2.3.0...v3.0.0
v2.3.0
What's Changed
Library Changes
- Improved native resource handling by using safe handles where possible by @Uight in #45
- Fixed incorrect priority assignment and refactored related documentation by @Uight in #44
- Fix wrong usage of ArgumentOutOfRangeException @Uight in #37
- Fixed a potential race condition in
QuickTickTimerImplementation.Dispose()and refactored the timer implementations to make the three timer variants behave more consistently. This also included adding functional unit tests to verify equivalent behavior across all timer implementations by @Uight in #41
Repository & CI
- Add security and contributing files by @Uight in #48
- Enabled GitHub Discussions, Security Vulnerability Reporting, Dependabot, and GitHub Code Scanning for the repository
- Github Workflow updates by @Uight in #31
Dependency & Tooling Updates
Note: These dependency updates only affect tooling/testing projects and are not part of the released QuickTick library package.
- Bump
nuget/setup-nugetfromv2tov4by @dependabot[bot] in #32 - Bump the Skia dependency group with 4 updates by @dependabot[bot] in #33
- Bump
QuestPDFfrom2025.7.0to2026.5.0by @dependabot[bot] in #36 - Bump
KGySoft.CoreLibrariesfrom9.0.0to10.5.1by @dependabot[bot] in #34 - Bump
Newtonsoft.Jsonfrom13.0.3to13.0.4by @dependabot[bot] in #35
v2.2.0
v2.1.0
What's Changed
- Supported OS clarification by @Uight in #27
=> All windows versions below windows 10 1803 now cause PlatformNotSupportedException. This includes Windows Server 2016
=> Clarify performance on other OS with more timing reports - Improve high res quick tick timer by @Uight in #28
=> Minimal sleep under windows improved allowing lower CPU usage in HighResQuickTickTimer. Default SleepThreshold is now 1.5 ms
=> Added YieldThreshold setting that defaults to 0.75 ms . See updated README.md for more information
v2.0.0
What's Changed
- #10 Fix calling Stop() from inside the elapsed event code causing a deadlock by @Uight in #12
- #13 Fix NaN causing infinite timers now causing ArgumentOutOfRangeException by @Uight in #14
- #11 Dont catch TaskCanceledException in Delay to match Fallback by @Uight in #15
- #18 Delay behavior for times <= 0 now same across platforms by @Uight in #20
- #19 Throw Platform notsupported exception if under windows older than win 10 by @Uight in #21
=> Removes support for win 7 and 8.1 because its unsure if the functions needed are available and no suitable fallback possible. - #22 API 2.0 redesign by @Uight in #23
=> New property Priority
=> New property SkipMissedIntervals
=> Reworked Event args (no longer scheduled and actual time): TimeSinceLastInterval and SkippedIntervals (To remove all absolute time references)
=> New HighResQuickTickTimer - #16 Generate timing reports by @Uight in #24
=> see the new Timing Reports linked in the README.md
See the fully updated README.md file for the full description.
v1.2.0
Release 1.2.0 of the QuickTick Timing functions.
Changes from v1.1.0
#6 The QuickTickTimer now allows sub-millisecond intervals as low as 0.5 ms.
#7 Implemented a new property "IsQuickTickUsed", which can be used to determine if the actual QuickTick implementation or the Fallback is used
#8 The package now also supports and is build for .NET Framework 4.8+
#9 Event handler now cleanly handles dispose
Thanks to @repdvan for an initial Pull Request and help on #6 and #8
v1.1.0
Release 1.1.0 of the QuickTick Timing functions.
Changes from v1.0.0
- #2 Fixed the delay function throwing OperationCanceledException when delay is canceled.
- #3 Updated package so it doesnt require windows as a platform anymore. On all systems that not support the actual QuickTick implementation fall back to the inbuilt .net functions.
- #4 Priority is no longer an exposed property. On windows the timer completion thread will use the priority of the thread that created the timer instead. Please also check the documentation about Power Settings in windows as this can help getting better timer accurancy.
Breaking Changes
- Priority property has been removed.
- The QuickTick timer now uses true as default for AutoReset to match the System.Timers.Timer which is the fallback solution on non windows systems. Before the autoreset was false by default.
v1.0.0
Release 1.0.0 of the QuickTick Timing functions.
Main changes from v0.0.1-alpha:
- Updated documentation
- Bugfix to not crash the timer when restarting it
- Added System.Timers.Timer like ElapsedEventArgs to QuickTickTimer
- Priority of the CompletionTask is now a public property of the QuickTickTimer
v0.0.1-alpha
QuickTickLib v0.0.1
A Timing library written in .net8.0 for windows only that provides a timer, a delay and sleep function that allow timing under 15.6ms without messing with the system clock