WIP
This commit is contained in:
@@ -8,6 +8,7 @@ use std::{
|
||||
pin::Pin,
|
||||
sync::Arc,
|
||||
task::{Context, Poll},
|
||||
time::Duration,
|
||||
};
|
||||
use util::TryFutureExt;
|
||||
|
||||
@@ -151,6 +152,11 @@ impl Executor {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn timer(&self, duration: Duration) -> smol::Timer {
|
||||
// todo!("integrate with deterministic dispatcher")
|
||||
smol::Timer::after(duration)
|
||||
}
|
||||
|
||||
pub fn is_main_thread(&self) -> bool {
|
||||
self.dispatcher.is_main_thread()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user