From 68441fb05412baebbd17f407bf984ad7a81af630 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 23 Jun 2018 19:02:18 +0200 Subject: global: use fast boottime instead of normal boottime Generally if we're inaccurate by a few nanoseconds, it doesn't matter. --- src/compat/compat.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/compat/compat.h') diff --git a/src/compat/compat.h b/src/compat/compat.h index d0efdb9..d08557f 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -334,11 +334,11 @@ static inline u64 ktime_get_boot_ns(void) } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) && !defined(ISRHEL7) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) #include -static inline bool ktime_after(const ktime_t cmp1, const ktime_t cmp2) +static inline u64 ktime_get_boot_fast_ns(void) { - return ktime_compare(cmp1, cmp2) > 0; + return ktime_get_boot_ns(); } #endif -- cgit v1.2.3-59-g8ed1b