diff options
author | koverstreet <kent.overstreet@gmail.com> | 2018-11-05 00:24:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-05 00:24:14 -0500 |
commit | ff2a414ccc6300c704989f4ee030f0874083b801 (patch) | |
tree | 4b06d971db49c2992c7ced11be0f73a95f0d5ad3 /include/linux/sched.h | |
parent | db8cffeaed01c917863d3f12b0203615a303ab8e (diff) | |
parent | 770d75e7e543f1b8060805b602cce589e1072976 (diff) |
Merge pull request #12 from modelrockettier/real_mount_time
Set the last mount time using the realtime clock
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 f9bb6a4d..cebaaf8b 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; |