From 77febe0e6b4e144992ea1b26ae1b9b45b746d970 Mon Sep 17 00:00:00 2001 From: "Brian L. Troutwine" Date: Mon, 27 Dec 2021 15:37:30 -0800 Subject: Introduce timer_* support This commit adds support for the signal timer mechanism in POSIX, the mirror to timerfd on Linux. Resolves #1424 Signed-off-by: Brian L. Troutwine --- src/sys/mod.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/sys/mod.rs') diff --git a/src/sys/mod.rs b/src/sys/mod.rs index 16ba9e0a..654a4d87 100644 --- a/src/sys/mod.rs +++ b/src/sys/mod.rs @@ -201,3 +201,18 @@ feature! { #[allow(missing_docs)] pub mod timerfd; } + +#[cfg(all( + any( + target_os = "freebsd", + target_os = "illumos", + target_os = "linux", + target_os = "netbsd" + ), + feature = "time", + feature = "signal" +))] +feature! { + #![feature = "time"] + pub mod timer; +} -- cgit v1.2.3