Skip to main content

start_timer

Function start_timer 

Source
pub fn start_timer() -> Instant
Expand description

Record the start of a latency measurement.

Returns a tokio::time::Instant that should be passed to elapsed_ms after the operation completes.

§Example

let start = start_timer();
do_something().await;
let ms = elapsed_ms(start);