blob: 4710d470f7835b75ab5638590cf1f7a263b0f587 [file] [log] [blame]
mod test_delay;
use crate::time::{self, Instant};
use std::time::Duration;
fn assert_send<T: Send>() {}
fn assert_sync<T: Sync>() {}
#[test]
fn registration_is_send_and_sync() {
use crate::time::driver::Registration;
assert_send::<Registration>();
assert_sync::<Registration>();
}
#[test]
#[should_panic]
fn delay_is_eager() {
let when = Instant::now() + Duration::from_millis(100);
let _ = time::delay_until(when);
}