1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// This file is part of file-descriptors. It is subject to the license terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/file-descriptors/master/COPYRIGHT. No part of file-descriptors, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
// Copyright © 2018-2019 The developers of file-descriptors. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/file-descriptors/master/COPYRIGHT.
extern "C"
/// A settable system-wide real-time clock.
pub const CLOCK_REALTIME: c_int = 0;
/// A nonsettable monotonically increasing clock that measures time from some unspecified point in the past that does not change after system startup.
pub const CLOCK_MONOTONIC: c_int = 1;
/// Like `CLOCK_MONOTONIC`, this is a monotonically increasing clock.
///
/// However, whereas the `CLOCK_MONOTONIC` clock does not measure the time while a system is suspended, the `CLOCK_BOOTTIME` clock does include the time during which the system is suspended.
/// This is useful for applications that need to be suspend-aware.
/// `CLOCK_REALTIME` is not suitable for such applications, since that clock is affected by discontinuous changes to the system clock.
///
/// Since Linux 3.15.
pub const CLOCK_BOOTTIME: c_int = 7;
/// This clock is like `CLOCK_REALTIME`, but will wake the system if it is suspended.
///
/// The caller must have the `CAP_WAKE_ALARM` capability in order to set a timer against this clock.
///
/// Since Linux 3.11.
pub const CLOCK_REALTIME_ALARM: c_int = 8;
/// This clock is like `CLOCK_BOOTTIME`, but will wake the system if it is suspended.
///
/// The caller must have the `CAP_WAKE_ALARM` capability in order to set a timer against this clock.
///
/// Since Linux 3.11.
pub const CLOCK_BOOTTIME_ALARM: c_int = 9;
/// Sets the `O_NONBLOCK` file status flag on the newly opened timerfd file description.
///
/// Since Linux 2.6.27.
pub const TFD_NONBLOCK: c_int = O_NONBLOCK;
/// Set the close-on-exec (`FD_CLOEXEC`) flag on the newly opened timerfd file description.
///
/// Since Linux 2.6.27.
pub const TFD_CLOEXEC: c_int = O_CLOEXEC;