MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / epoll_timeout_secs

Function epoll_timeout_secs

tests/event/epoll_timeout.rs:29–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28#[test]
29fn 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}

Callers

nothing calls this directly

Calls 3

spare_capacityFunction · 0.85
createFunction · 0.50
waitFunction · 0.50

Tested by

no test coverage detected