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:
parent
1982a8c27d
commit
c61a1bd659
3 changed files with 66 additions and 33 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue