mirror of
https://github.com/chatmail/core.git
synced 2026-04-29 11:26:29 +03:00
async sleep
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user