Get current timestamp in milliseconds. 获取当前时间戳(毫秒)。
()
| 131 | /// Get current timestamp in milliseconds. |
| 132 | /// 获取当前时间戳(毫秒)。 |
| 133 | pub fn now() -> f64 { |
| 134 | let window = web_sys::window().expect("No window found"); |
| 135 | window |
| 136 | .performance() |
| 137 | .expect("No performance object") |
| 138 | .now() |
| 139 | } |
| 140 | |
| 141 | /// Log a message to the console. |
| 142 | /// 向控制台输出消息。 |
no outgoing calls
no test coverage detected