Add a sleep function to the WasiSched trait.
This commit is contained in:
@@ -108,6 +108,9 @@ impl WasiSched for SyncSched {
|
||||
std::thread::yield_now();
|
||||
Ok(())
|
||||
}
|
||||
fn sleep(&self, duration: Duration) {
|
||||
std::thread::sleep(duration)
|
||||
}
|
||||
}
|
||||
|
||||
fn wasi_file_raw_fd(f: &dyn WasiFile) -> Option<RawFd> {
|
||||
|
||||
@@ -128,6 +128,9 @@ impl WasiSched for SyncSched {
|
||||
thread::yield_now();
|
||||
Ok(())
|
||||
}
|
||||
fn sleep(&self, duration: Duration) {
|
||||
std::thread::sleep(duration)
|
||||
}
|
||||
}
|
||||
|
||||
fn wasi_file_raw_handle(f: &dyn WasiFile) -> Option<RawHandle> {
|
||||
|
||||
Reference in New Issue
Block a user