API reference Dodo 0.1.4

std/time/timer

Public declarations, types, methods, and source contracts for std/time/timer.

On this page

Library guide · API index and notation

This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.

import "std/time/timer"

Names used in signatures

Unqualified names denote this package’s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.

Alias Package Source file
time std/time timer.dodo

arm

Function · Source

Monomorphized timer capability: arm(Instant)->void!TimeError, cancel()->bool, poll(&Instant)->bool!TimeError. One-shot semantics.

pub fn arm<T>(timer: &mut T, deadline: time.Instant) -> void!time.TimeError

cancel

Function · Source

pub fn cancel<T>(timer: &mut T) -> bool

poll

Function · Source

pub fn poll<T>(timer: &mut T, current: &time.Instant) -> bool!time.TimeError

FakeTimer

Struct · Source

pub struct FakeTimer {
    // Private implementation fields omitted.
}

FakeTimer.new

Function · Source

pub fn new(clock_id: u64) -> FakeTimer

FakeTimer.arm

Function · Source

Re-arming replaces the previous deadline. Wrong identity changes nothing.

pub fn arm(&mut self, deadline: time.Instant) -> void!time.TimeError

FakeTimer.cancel

Function · Source

pub fn cancel(&mut self) -> bool

FakeTimer.is_armed

Function · Source

pub fn is_armed(&self) -> bool

FakeTimer.poll

Function · Source

A true result consumes readiness exactly once; later polls return false.

pub fn poll(&mut self, current: &time.Instant) -> bool!time.TimeError

Type to search all documentation.

Keyboard shortcuts

Search documentation
Ctrl K or /
Move through results
↑ ↓
Open selected result
Enter
Close a dialog
Esc
Show these shortcuts
?