diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 0316f50..885cc56 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -141,4 +141,14 @@ static inline u64 ktime_get_seconds(void) return ts.tv_sec; } +static inline struct timespec current_kernel_time(void) +{ + struct timespec ts; + + clock_gettime(CLOCK_MONOTONIC, &ts); + return ts; +} + +#define CURRENT_TIME (current_kernel_time()) + #endif /* __TOOLS_LINUX_SCHED_H */ |