diff options
author | Tim Schlueter <schlueter.tim@linux.com> | 2018-11-04 21:00:33 -0800 |
---|---|---|
committer | Tim Schlueter <schlueter.tim@linux.com> | 2018-11-04 21:00:33 -0800 |
commit | 03c79a9a258669bb18bb54da805353049d4811d0 (patch) | |
tree | 5c90579ef10203b49881416d0c3fd3499448ae7d /include/linux/sched.h | |
parent | db8cffeaed01c917863d3f12b0203615a303ab8e (diff) |
Added ktime_get_real_seconds() wrapper
Also, changed the last_mount print so it no longer prints out two newlines.
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index f9bb6a4..cebaaf8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -138,6 +138,15 @@ static inline u64 ktime_get_seconds(void) return ts.tv_sec; } +static inline u64 ktime_get_real_seconds(void) +{ + struct timespec ts; + + clock_gettime(CLOCK_REALTIME, &ts); + + return ts.tv_sec; +} + static inline struct timespec current_kernel_time(void) { struct timespec ts; |