Function get_now

Source
pub fn get_now() -> f64
Expand description

Returns the representation of the current app running time with the highest precision using the emscripten-defined emscripten_get_now. It is most likely implemented using performance.now(), and is relevant only in comparison with other calls to this function.

ยงExamples

let start_time = get_now();

let x = 0;
for i in 1..100 {
    x += i;
}

println!("It took {} seconds", get_now() - start_time);