Home
last modified time | relevance | path

Searched refs:Instant (Results 1 – 25 of 35) sorted by relevance

12

/wasmtime-44.0.1/crates/wasi/src/p2/host/
H A Dclocks.rs4 clocks::monotonic_clock::{self, Duration as WasiDuration, Instant},
77 } else if let Some(deadline) = tokio::time::Instant::now().checked_add(duration) { in subscribe_to_duration()
81 table.push(Deadline::Instant(deadline))? in subscribe_to_duration()
91 fn now(&mut self) -> wasmtime::Result<Instant> { in now() argument
95 fn resolution(&mut self) -> wasmtime::Result<Instant> { in resolution() argument
99 fn subscribe_instant(&mut self, when: Instant) -> wasmtime::Result<Resource<DynPollable>> { in subscribe_instant()
119 Instant(tokio::time::Instant), enumerator
128 Deadline::Instant(instant) => tokio::time::sleep_until(*instant).await, in ready()
/wasmtime-44.0.1/crates/wasi/src/p3/clocks/
H A Dmod.rs65 impl From<crate::clocks::Datetime> for system_clock::Instant { implementation
79 impl From<system_clock::Instant> for crate::clocks::Datetime {
81 system_clock::Instant {
84 }: system_clock::Instant,
H A Dhost.rs11 fn now(&mut self) -> wasmtime::Result<system_clock::Instant> { in now() argument
13 Ok(system_clock::Instant { in now()
/wasmtime-44.0.1/examples/wasm/
H A Dwasi.rs2 use std::time::{Duration, Instant};
6 let start = Instant::now(); in main()
8 println!("Napped for {:?}", Instant::now().duration_since(start)); in main()
/wasmtime-44.0.1/crates/wasi-common/src/
H A Dclocks.rs2 use cap_std::time::{Duration, Instant, SystemTime};
16 fn now(&self, precision: Duration) -> Instant; in now() argument
20 pub creation_time: cap_std::time::Instant,
H A Dsched.rs4 use cap_std::time::Instant;
46 deadline: Instant, in subscribe_monotonic_clock() argument
/wasmtime-44.0.1/crates/test-programs/src/bin/
H A Dp2_api_time.rs1 use std::time::{Duration, Instant, SystemTime};
4 let then = Instant::now(); in main()
H A Dp2_cli_default_clocks.rs2 let a = std::time::Instant::now(); in main()
3 let b = std::time::Instant::now(); in main()
/wasmtime-44.0.1/cranelift/codegen/src/
H A Dtiming.rs127 use std::time::Instant;
239 static LAST_INSTANT: Cell<Option<Instant>> = Cell::new(None);
250 fn monotonic_instant() -> Instant { in monotonic_instant()
252 None => Instant::now(), in monotonic_instant()
254 let system_now = Instant::now(); in monotonic_instant()
281 start: Instant,
/wasmtime-44.0.1/crates/test-programs/src/
H A Dnn.rs14 use std::time::Instant;
52 let before = Instant::now(); in classify()
87 use std::time::Instant;
120 let before = Instant::now(); in classify()
/wasmtime-44.0.1/crates/wasi-common/src/sched/
H A Dsubscription.rs5 use cap_std::time::{Duration, Instant};
36 pub deadline: Instant,
41 pub fn now(&self) -> Instant { in now() argument
/wasmtime-44.0.1/benches/
H A Dthread_eager_init.rs3 use std::time::{Duration, Instant};
57 let call = Instant::now(); in duration_of_call()
77 let init_start = Instant::now(); in eager_thread_instantiate()
H A Dcompile_time_builtins.rs4 use std::{mem, time::Instant};
319 let start = Instant::now(); in func_wrap_host_buf_api()
372 let start = Instant::now(); in compile_time_builtins_host_buf_api()
453 let start = Instant::now(); in take_and_return_list_u8()
557 let start = Instant::now(); in func_wrap_host_buf_api()
610 let start = Instant::now(); in compile_time_builtins_host_buf_api()
673 let start = Instant::now(); in take_and_return_list_u8()
H A Dtrap.rs72 let start = std::time::Instant::now(); in bench_multi_threaded_traps()
112 let start = std::time::Instant::now(); in bench_many_modules_registered_traps()
142 let start = std::time::Instant::now(); in bench_many_stack_frames_traps()
202 let start = std::time::Instant::now(); in bench_host_wasm_frames_traps()
H A Dwasi.rs4 use std::{fs::File, path::Path, time::Instant};
33 let start = Instant::now(); in bench_wasi()
/wasmtime-44.0.1/crates/wasi-common/src/sync/
H A Dclocks.rs2 use cap_std::time::{Duration, Instant, SystemTime};
32 fn now(&self, precision: Duration) -> Instant { in now() argument
/wasmtime-44.0.1/crates/wasi-http/src/
H A Dhandler.rs19 use std::time::{Duration, Instant};
198 struct StartTimes(BTreeMap<Instant, usize>);
201 fn add(&mut self, time: Instant) { in add() argument
205 fn remove(&mut self, time: Instant) { in remove() argument
220 fn earliest(&self) -> Option<Instant> { in earliest() argument
338 let start_time = Instant::now().checked_add(request_timeout); in run_()
/wasmtime-44.0.1/crates/wasmtime/src/profiling_agent/
H A Dpulley.rs45 use std::time::{Duration, Instant};
172 let start = Instant::now(); in sampling_thread()
193 .checked_duration_since(Instant::now()) in sampling_thread()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/
H A Dparking_spot.rs21 use std::time::{Duration, Instant};
77 deadline: impl Into<Option<Instant>>, in wait32() argument
93 deadline: impl Into<Option<Instant>>, in wait64() argument
108 deadline: Option<Instant>, in wait() argument
159 let now = Instant::now(); in wait()
317 use std::time::{Duration, Instant};
609 let timeout = Instant::now() + Duration::from_millis(1); in wait_with_timeout()
/wasmtime-44.0.1/tests/all/guest_debug/
H A Dmod.rs79 let deadline = std::time::Instant::now() + timeout; in spawn()
82 if std::time::Instant::now() > deadline { in spawn()
105 let deadline = std::time::Instant::now() + timeout; in wait_for_stderr()
108 if std::time::Instant::now() > deadline { in wait_for_stderr()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/memory/
H A Dshared_memory.rs11 use std::time::{Duration, Instant};
141 let deadline = timeout.map(|d| Instant::now() + d); in atomic_wait32()
165 let deadline = timeout.map(|d| Instant::now() + d); in atomic_wait64()
/wasmtime-44.0.1/tests/all/
H A Dwait_notify.rs4 use std::time::Instant;
28 let now = Instant::now(); in atomic_wait_timeout_length()
/wasmtime-44.0.1/cranelift/codegen/
H A Dbuild.rs24 use std::time::Instant;
27 let start_time = Instant::now(); in main()
97 Instant::now() - start_time in main()
/wasmtime-44.0.1/crates/wasi/src/
H A Dclocks.rs1 use cap_std::time::{Duration, Instant, SystemClock, SystemTime};
124 initial: Instant,
/wasmtime-44.0.1/crates/wasi-nn/examples/classification-example-winml/src/
H A Dmain.rs3 use std::{fs, time::Instant};
33 let before_compute = Instant::now(); in main()

12