pub trait AsyncTimer: Send + Debug + 'static { // Required methods fn reset(self: Pin<&mut Self>, i: Instant); fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()>; }
异步定时器的抽象实现,用于运行时无关性
将定时器更新为在 i 时刻触发
i
检查定时器是否已到期;若尚未到期则注册为等待唤醒