#![allow(unused)]
use async_foundation::timer::timer::Timer;
use futures::executor::block_on;
use futures::join;
use std::future::Future;
use std::ops::DerefMut;
use std::pin::Pin;
use std::sync::{Arc, Condvar, Mutex};
use std::task::{Context, Poll};
use std::thread;
use std::thread::JoinHandle;
use std::time::Duration;
fn main() {
let mut timer = Timer::new();
let test = async {
let x1 = timer.wait(Duration::from_millis(1000));
thread::sleep(Duration::from_millis(450));
let x2 = timer.wait(Duration::from_millis(500));
let x3 = timer.wait(Duration::from_millis(1000));
join!(x1, x2, x3);
};
block_on(test);
eprintln!("unblock main");
}