0.2.0 Preview 1 · Frozen documentation
TimeError
Classifies sampling, domain and checked time arithmetic failures.
Sn is under heavy development. Reference extracted from this release’s bundled standard library. Public API examples are not an exhaustive compatibility test. Read the matching release guide for tested workflows and limitations. Read the status →
Module std.time
import std.time;Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.
TimeError
pub enum TimeErrorClassifies sampling, domain and checked time arithmetic failures.
TimeError.ClockUnavailable
ClockUnavailable;The selected platform clock cannot provide a sample.
TimeError.RangeOverflow
RangeOverflow;Finite native ticks or time arithmetic exceed the selected carrier.
TimeError.IncompatibleClockDomain
IncompatibleClockDomain;Invalid/default or different monotonic domains cannot be compared.
TimeError.CalendarRange
CalendarRange;UTC formatting requires Gregorian year1..9999.
TimeError.InvalidDuration
InvalidDuration;Exact duration conversion or relative-wait validation failed.
TimeError.InvalidDuration.Error
Error: DurationError;Original stable checked duration failure.
Documentation snapshot: October 24, 2026 About versions ↗