The planned change to unify the behaviour of the MONOTONIC and BOOTTIME clocks vs. suspend removes the ability to retrieve the active non-suspended time of a system. Provide a new CLOCK_MONOTONIC_ACTIVE clock which returns the active non-suspended time of the system via clock_gettime(). This preserves the old behaviour of CLOCK_MONOTONIC before the BOOTTIME/MONOTONIC unification. This new clock also allows applications to detect programmatically that the MONOTONIC and BOOTTIME clocks are identical.
Showing the changes to include/uapi/linux (1 of 6 files). Show all
Unified · Split
| @@ -61,6 +61,7 @@ struct itimerval { · 60 unmodified lines | ||
| 61 | 61 | */ |
| 62 | 62 | #define CLOCK_SGI_CYCLE 10 |
| 63 | 63 | #define CLOCK_TAI 11 |
| 64 | +#define CLOCK_MONOTONIC_ACTIVE 12 | |
| 64 | 65 | |
| 65 | 66 | #define MAX_CLOCKS 16 |
| 66 | 67 | #define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC) |