naia-shared 0.25.0

Common functionality shared between naia-server & naia-client crates
Documentation
1
2
3
4
5
6
7
8
9
10
11
use js_sys::Date;

#[doc(hidden)]
pub struct Timestamp;

impl Timestamp {
    /// Returns the current wall-clock time as milliseconds since the Unix epoch.
    pub fn now() -> u64 {
        Date::now() as u64
    }
}