async sleep

This commit is contained in:
dignifiedquire
2020-03-04 17:27:25 +01:00
parent 43a8828430
commit 62bfa5157b
4 changed files with 6 additions and 6 deletions

View File

@@ -82,7 +82,7 @@ async fn main() {
.unwrap();
ctx.configure().await;
thread::sleep(duration);
async_std::task::sleep(duration).await;
println!("sending a message");
let contact_id = Contact::create(&ctx, "dignifiedquire", "dignifiedquire@gmail.com").unwrap();
@@ -101,7 +101,7 @@ async fn main() {
println!("chat: {} - {:?} - {:?}", i, text1, text2,);
}
thread::sleep(duration);
async_std::task::sleep(duration).await;
println!("stopping threads");