MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / now_ns

Method now_ns

compiler/src/modules/vm/helpers.rs:39–41  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

37 /// Host-provided wall clock (ns); without one, `sleep` advances a deterministic virtual clock.
38 pub fn set_time_hook(&mut self, hook: fn() -> u64) { self.time_hook = Some(hook); }
39 pub(crate) fn now_ns(&self) -> u64 {
40 match self.time_hook { Some(h) => h(), None => self.virtual_clock_ns }
41 }
42
43 pub fn heap_usage(&self) -> usize { self.heap.usage() }
44 pub fn cache_stats(&self) -> (usize, usize) { (self.templates.count(), self.chunk.instructions.len()) }

Callers 5

wake_waiting_outersMethod · 0.80
compute_wake_outcomeMethod · 0.80
top_loopMethod · 0.80
call_sleepMethod · 0.80
call_with_timeoutMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected