net-socket-packet 0.1.0

net-socket-packet
Documentation
1
2
3
4
5
6
7
8
9
use wasm_bindgen::JsCast;
use wasm_bindgen::prelude::*;

pub fn now() -> f64 {
    js_sys::Reflect::get(&js_sys::global(), &JsValue::from_str("performance"))
        .expect("failed to get performance from global object")
        .unchecked_into::<web_sys::Performance>()
        .now()
}