support windows

This commit is contained in:
Pat Hickey
2021-05-04 14:26:00 -07:00
parent f76fe8b764
commit e0f3423161
3 changed files with 18 additions and 3 deletions

View File

@@ -5,12 +5,12 @@ pub enum SystemTimeSpec {
Absolute(SystemTime),
}
pub trait WasiSystemClock {
pub trait WasiSystemClock: Send + Sync {
fn resolution(&self) -> Duration;
fn now(&self, precision: Duration) -> SystemTime;
}
pub trait WasiMonotonicClock {
pub trait WasiMonotonicClock: Send + Sync {
fn resolution(&self) -> Duration;
fn now(&self, precision: Duration) -> Instant;
}