History

timekeeping: Add the new CLOCK_MONOTONIC_ACTIVE clock

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.

Thomas Gleixner committed 8 years ago

Commit 72199321 parent 78b98e36 files · +55 −0Browse files

Showing the changes to include/uapi/linux (1 of 6 files). Show all

Unified · Split

include/uapi/linux/time.h+1−0
@@ -61,6 +61,7 @@ struct itimerval { · 60 unmodified lines
6161 */
6262 #define CLOCK_SGI_CYCLE 10
6363 #define CLOCK_TAI 11
64+#define CLOCK_MONOTONIC_ACTIVE 12
6465
6566 #define MAX_CLOCKS 16
6667 #define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC)