()
| 27 | |
| 28 | #[test] |
| 29 | fn epoll_timeout_secs() { |
| 30 | let epoll_fd = epoll::create(epoll::CreateFlags::CLOEXEC).unwrap(); |
| 31 | |
| 32 | let start = Instant::now(); |
| 33 | let mut events = Vec::with_capacity(1); |
| 34 | epoll::wait( |
| 35 | &epoll_fd, |
| 36 | spare_capacity(&mut events), |
| 37 | Some(&Timespec { |
| 38 | tv_sec: 1, |
| 39 | tv_nsec: 0, |
| 40 | }), |
| 41 | ) |
| 42 | .unwrap(); |
| 43 | |
| 44 | let duration = start.elapsed(); |
| 45 | |
| 46 | assert!(duration.as_secs() >= 1); |
| 47 | } |
nothing calls this directly
no test coverage detected