MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / wall_clock

Method wall_clock

crates/wasi/src/ctx.rs:378–381  ·  view source on GitHub ↗

Configures `wasi:clocks/wall-clock` to use the `clock` specified. By default the host's wall clock is used.

(&mut self, clock: impl HostWallClock + 'static)

Source from the content-addressed store, hash-verified

376 ///
377 /// By default the host's wall clock is used.
378 pub fn wall_clock(&mut self, clock: impl HostWallClock + 'static) -> &mut Self {
379 self.clocks.wall_clock = Box::new(clock);
380 self
381 }
382
383 /// Configures `wasi:clocks/monotonic-clock` to use the `clock` specified.
384 ///

Callers 1

p2_api_timeFunction · 0.80

Calls 1

newFunction · 0.50

Tested by 1

p2_api_timeFunction · 0.64