()
| 4 | |
| 5 | #[test] |
| 6 | fn epoll_timeout_nsecs() { |
| 7 | let epoll_fd = epoll::create(epoll::CreateFlags::CLOEXEC).unwrap(); |
| 8 | |
| 9 | let start = Instant::now(); |
| 10 | let mut events = Vec::with_capacity(1); |
| 11 | epoll::wait( |
| 12 | &epoll_fd, |
| 13 | spare_capacity(&mut events), |
| 14 | Some(&Timespec { |
| 15 | tv_sec: 0, |
| 16 | tv_nsec: 1_000_000, |
| 17 | }), |
| 18 | ) |
| 19 | .unwrap(); |
| 20 | |
| 21 | let duration = start.elapsed(); |
| 22 | |
| 23 | assert!( |
| 24 | duration.as_secs() > 0 || (duration.as_secs() == 0 && duration.subsec_nanos() >= 1_000_000) |
| 25 | ); |
| 26 | } |
| 27 | |
| 28 | #[test] |
| 29 | fn epoll_timeout_secs() { |
nothing calls this directly
no test coverage detected