diff options
author | 2020-06-29 10:23:12 +0000 | |
---|---|---|
committer | 2020-06-29 10:23:12 +0000 | |
commit | 86e7d0549c97c62412292a01cf0500f5db121c18 (patch) | |
tree | a20149a6686d8391b3a94396ac3011099c6535ea /sys/dev/pci/drm/include | |
parent | remove unused getrawmonotonic() and ktime_mono_to_real() (diff) | |
download | wireguard-openbsd-86e7d0549c97c62412292a01cf0500f5db121c18.tar.xz wireguard-openbsd-86e7d0549c97c62412292a01cf0500f5db121c18.zip |
use time since epoch not time since boot for 'real' interfaces
Diffstat (limited to 'sys/dev/pci/drm/include')
-rw-r--r-- | sys/dev/pci/drm/include/linux/timekeeping.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/dev/pci/drm/include/linux/timekeeping.h b/sys/dev/pci/drm/include/linux/timekeeping.h index 374bd23d873..ea19385fad6 100644 --- a/sys/dev/pci/drm/include/linux/timekeeping.h +++ b/sys/dev/pci/drm/include/linux/timekeeping.h @@ -3,15 +3,21 @@ #ifndef _LINUX_TIMEKEEPING_H #define _LINUX_TIMEKEEPING_H +#define ktime_get_boottime() ktime_get() #define get_seconds() gettime() -#define ktime_get_real() ktime_get() -#define ktime_get_boottime() ktime_get() - -static inline int64_t +static inline time_t ktime_get_real_seconds(void) { - return ktime_get().tv_sec; + return gettime(); +} + +static inline struct timeval +ktime_get_real(void) +{ + struct timeval tv; + getmicrotime(&tv); + return tv; } static inline uint64_t |