Development · Evolving reference
TimeError
Classifies sampling, domain and checked time arithmetic failures.
Sn is under heavy development. This reference includes the intended 1.0 design; features may be incomplete in the current compiler. 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 ↗