KhaosKode.Time
1.0.7
This was a bit of an experiment to see how to use nuget. I understand a tiny bit more now than before. Please feel free to look at the KhaosKoder.* series of packages. They replace this package - with absolutely minimal code changes required. I will try to keep the packages stable under those names from here on.
dotnet add package KhaosKode.Time --version 1.0.7
NuGet\Install-Package KhaosKode.Time -Version 1.0.7
<PackageReference Include="KhaosKode.Time" Version="1.0.7" />
<PackageVersion Include="KhaosKode.Time" Version="1.0.7" />
<PackageReference Include="KhaosKode.Time" />
paket add KhaosKode.Time --version 1.0.7
#r "nuget: KhaosKode.Time, 1.0.7"
#:package KhaosKode.Time@1.0.7
#addin nuget:?package=KhaosKode.Time&version=1.0.7
#tool nuget:?package=KhaosKode.Time&version=1.0.7
Khaos.Time
Internal time abstractions and helpers shared by the Khaos. libraries. Not intended for standalone use.*
Khaos.Time provides deterministic and system-backed clock abstractions (local, UTC, and virtual) that keep the rest of the Khaos ecosystem testable and predictable. Every packable project in this solution ships under the NuGet package ID KhaosCode.Time, and versioning is driven via MinVer + Git tags.
Features
ISystemClockinterface plus concrete implementations (LocalSystemClock,UtcSystemClock,VirtualSystemClock).- Thread-safe virtual clock with manual advancement for deterministic testing.
- Central
SystemClock.Instancefor default dependency injection. - 100% test coverage (tracked via Coverlet + ReportGenerator) with xUnit tests in
tests/Khaos.Time.Tests.
Getting Started
- Restore tools and dependencies
cd scripts dotnet tool restore - Build the solution
.\build.ps1 - Run tests
.\test.ps1 - Run tests with coverage (HTML reports land in
TestResults/coverage-html).\test-with-coverage.ps1
Versioning & Releases
Semantic Versioning 2.0.0 is enforced via MinVer with the tag prefix Khaos.Time/v. All packable projects share the same version per commit. See docs/versioning-guide.md for the complete workflow, including how to:
- choose MAJOR/MINOR/PATCH bumps,
- tag a release locally,
- run the pack pipeline (
dotnet pack -c Release).
Packaging
The primary NuGet artifact is produced via:
dotnet pack -c Release
Output lives under src/Khaos.Time/bin/Release (e.g., KhaosCode.Time.<version>.nupkg).
Repository Layout
src/Khaos.Time– production library.tests/Khaos.Time.Tests– xUnit test suite with Coverlet instrumentation.scripts/– PowerShell helpers for build, clean, test, and coverage flows.docs/– product documentation, includingversioning-guide.md.TestResults/– generated at test time; coverage HTML lives here.
Contributing
This repo is intended for internal Khaos projects. Follow the existing coding style, keep the XML docs up to date, and ensure the scripts succeed locally before raising a PR. For breaking changes, coordinate with downstream Khaos.* maintainers since the clocks are widely shared.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 1.0.7 | 92 | 3/12/2026 |