Make timer method available on both foreground and background executors

Also, make it return a static future.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2022-03-04 13:47:06 -08:00
parent 1982a8c27d
commit c61a1bd659
3 changed files with 66 additions and 33 deletions

View file

@ -1,5 +1,6 @@
use smol::future::FutureExt;
use std::{future::Future, time::Duration};
pub use util::*;
pub fn post_inc(value: &mut usize) -> usize {
let prev = *value;