mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-29 21:26:48 -06:00
11 lines
344 B
Rust
11 lines
344 B
Rust
use gridcraft_engine::core::date::unix_now_ms;
|
|
|
|
#[test]
|
|
fn ui_clock_returns_current_unix_milliseconds() {
|
|
let before = unix_now_ms().unwrap();
|
|
let now = gridcraft_ui_egui::now_ms();
|
|
let after = unix_now_ms().unwrap();
|
|
assert!(now.is_finite() && now > 0.0);
|
|
assert!((before.min(after)..=before.max(after)).contains(&now));
|
|
}
|