(&self)
| 33 | |
| 34 | impl 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. |
no outgoing calls
no test coverage detected