Expand description
Wall-clock access that degrades gracefully on wasm32-unknown-unknown.
std::time::Instant::now() and SystemTime::now() panic on bare wasm32
(no OS clock). The anti-hang wall-clock budgets in the interpreter, the CPU
backend, and the SVG exporter are catch-all guards layered over the primary
deterministic budgets (operator counts, command counts, pixel budgets, mask
byte caps) — so on wasm they are simply disabled: Instant::now returns a
fixed epoch and a deadline built by now() + budget is never reached. The
deterministic budgets keep adversarial inputs bounded there.
On every other target this is a zero-cost re-export of std::time::Instant.
Structs§
Functions§
- unix_
seconds - Seconds since the Unix epoch, or 0 on targets without a wall clock
(bare wasm32). Callers stamping dates (e.g.
/ModDate) fall back to the epoch rather than panicking.