mirror of
https://github.com/denoland/deno.git
synced 2024-12-24 08:09:08 -05:00
6 lines
179 B
Rust
6 lines
179 B
Rust
|
fn op_bench_now(state: &mut OpState) -> Result<u64, AnyError> {
|
||
|
let ns = state.borrow::<time::Instant>().elapsed().as_nanos();
|
||
|
let ns_u64 = u64::try_from(ns)?;
|
||
|
Ok(ns_u64)
|
||
|
}
|