Lines Matching defs:timer
5 use nix::sys::timer::{Expiration, Timer, TimerSetTimeFlags};
43 // Create the timer. We use the monotonic clock here, though any would do
44 // really. The timer is set to fire every 250 milliseconds with no delay for
51 let mut timer =
52 Timer::new(clockid, sigevent).expect("failed to create timer");
55 timer.set(expiration, flags).expect("could not set timer");
62 // timer. Depending on when this runs either an `Expiration::Interval` or
63 // `Expiration::IntervalDelayed` will be present. That is, if the timer has
66 // timer still being extant.
67 match timer.get() {
72 _ => panic!("timer lost its expiration"),
90 // 1) deregister the OS's timer.
91 // 2) Wait for a full timer period, since POSIX does not require that
92 // disabling the timer will clear pending signals, and on NetBSD at least
97 drop(timer);