tokio = { "version" = "1.10", features = ["full"] }
use tokio::time;
async fn print() {
let mut interval = time::interval(time::Duration::from_secs(1));
loop {
.tick().await;
intervalprintln!("2333");
}
}
#[tokio::main]
async fn main() {
tokio::spawn(print());
std::thread::sleep(std::time::Duration::from_secs(3));
}
2333
2333
2333