Function start [src]

Initialize the timer by querying for a supported clock. Returns error.TimerUnsupported when such a clock is unavailable. This should only fail in hostile environments such as linux seccomp misuse.

Prototype

pub fn start() Error!Timer

Possible Errors

TimerUnsupported

Source

pub fn start() Error!Timer { const current = Instant.now() catch return error.TimerUnsupported; return Timer{ .started = current, .previous = current }; }