Skip to content

Commit b55d254

Browse files
committed
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 <[email protected]>
1 parent c77a872 commit b55d254

File tree

7 files changed

+464
-289
lines changed

7 files changed

+464
-289
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
2525
(#[1547](https://github.com/nix-rust/nix/pull/1547))
2626
- Added getter methods to `MqAttr` struct
2727
(#[1619](https://github.com/nix-rust/nix/pull/1619))
28+
- Added `timer` support
29+
(#[1622](https://github.com/nix-rust/nix/pull/1622))
2830

2931
### Changed
3032
### Fixed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ sched = ["process"]
7070
signal = ["process"]
7171
socket = []
7272
term = []
73-
time = []
73+
time = ["signal"]
7474
ucontext = ["signal"]
7575
uio = []
7676
users = ["features"]

src/sys/mod.rs

+10
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,13 @@ feature! {
201201
#[allow(missing_docs)]
202202
pub mod timerfd;
203203
}
204+
205+
#[cfg(any(target_os = "freebsd",
206+
target_os = "illumos",
207+
target_os = "linux",
208+
target_os = "netbsd"
209+
))]
210+
feature! {
211+
#![feature = "time"]
212+
pub mod timer;
213+
}

0 commit comments

Comments
 (0)