Chneau.TimeTable
1.0.0
dotnet add package Chneau.TimeTable --version 1.0.0
NuGet\Install-Package Chneau.TimeTable -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Chneau.TimeTable" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Chneau.TimeTable" Version="1.0.0" />
<PackageReference Include="Chneau.TimeTable" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Chneau.TimeTable --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Chneau.TimeTable, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Chneau.TimeTable@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Chneau.TimeTable&version=1.0.0
#tool nuget:?package=Chneau.TimeTable&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
timetable-cs
A modern, high-performance capacity and schedule constraint evaluation engine in C# (.NET 10).
Ported from chneau/timetable (Go) and chneau/timetable-java (Java 26), with full generic math (INumber<T>) support and seamless integration with Chneau.OpenHours.
Features
- Generic Capacity Math: Works with any numeric type (
int,long,double,float,decimal) via .NETINumber<T>. - Immutable Timeline Design: Safe concurrency with structural sharing and state updates.
- Schedule Constraint Integration: Pluggable
IWhenableinterface directly compatible withOpenHoursexpressions. - Zero-Allocation Queries: Fast capacity evaluations and constraint searches.
- High-Performance JSON Serialization: Custom
System.Text.Jsonconverter.
Installation
dotnet add package Chneau.TimeTable
Quick Start
using Chneau.OpenHours;
using Chneau.TimeTable;
// 1. Create a timetable with an OpenHours schedule constraint
var oh = OpenHours.Parse("Mo-Fr 09:00-17:00");
var tt = new TimeTable<int>(max: 5, openHours: oh);
var mondayMorning = new DateTime(2026, 8, 24, 10, 0, 0, DateTimeKind.Utc);
var oneHour = TimeSpan.FromHours(1);
// 2. Reserve capacity
var updated = tt.Add(mondayMorning, oneHour, cap: 2);
if (updated != null)
{
Console.WriteLine($"Reserved successfully! Current points: {updated.Count}");
}
// 3. Find the soonest available slot for a 2-hour task requiring 4 slots of capacity
DateTime? nextAvailable = tt.When(mondayMorning, TimeSpan.FromHours(2), cap: 4);
Console.WriteLine($"Next slot: {nextAvailable}");
Benchmarks
Run benchmarks locally:
dotnet test -c Release --filter TestRunBenchmarkSuite --logger "console;verbosity=detailed"
Sample results (.NET 10 on AMD Ryzen 9):
| Benchmark | Calls | Total Time | Per Operation | Allocations |
|---|---|---|---|---|
| Sequential Add | 50,000 | 155 ms | 3.1 μs/op | 920 B/op |
Capacity Search (When) |
20,000 | 7.8 ms | 0.39 μs/op | 105 B/op |
| JSON Deserialization | 10,000 | 36.5 ms | 3.6 μs/op | 664 B/op |
License
MIT © chneau
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Chneau.OpenHours (>= 1.0.2)
- Microsoft.NET.Test.Sdk (>= 17.13.0)
- xunit (>= 2.9.3)
- xunit.runner.visualstudio (>= 3.0.2)
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.0 | 91 | 9/5/2026 |