MCPcopy Create free account
hub / github.com/endbasic/endbasic / now

Method now

web/src/store.rs:35–40  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

33
34impl Clock for JsClock {
35 fn now(&self) -> io::Result<OffsetDateTime> {
36 match OffsetDateTime::from_unix_timestamp((js_sys::Date::now() / 1000.0) as i64) {
37 Ok(now) => Ok(now),
38 Err(e) => Err(io::Error::new(io::ErrorKind::InvalidData, format!("{}", e))),
39 }
40 }
41}
42
43/// Key for a program stored in the browser's local storage.

Callers 2

putMethod · 0.80
current_time_millisFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected