This commit is contained in:
2026-07-27 17:22:50 +07:00
parent 8d4d8184e6
commit fd32b8c0ce
3 changed files with 28 additions and 3 deletions

View File

@@ -1,7 +1,31 @@
use std::time::Duration;
use gpui::*;
use ui::Root;
use universal_time::{Instant, MonotonicClock, SystemTime, WallClock, define_time_provider};
use wasm_bindgen::prelude::*;
struct CustomTimeProvider;
impl WallClock for CustomTimeProvider {
fn system_time(&self) -> SystemTime {
SystemTime::from_unix_duration(Duration::from_secs(0))
}
}
impl MonotonicClock for CustomTimeProvider {
fn instant(&self) -> Instant {
Instant::from_ticks(Duration::from_secs(0))
}
}
define_time_provider!(CustomTimeProvider);
fn main() {
// Binary entry point — actual initialization happens in `run()` below,
// which is called explicitly from JavaScript after the WASM module loads.
}
#[wasm_bindgen]
pub fn run() -> Result<(), JsValue> {
console_error_panic_hook::set_once();