summaryrefslogtreecommitdiff
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorkoverstreet <kent.overstreet@gmail.com>2018-11-05 00:24:14 -0500
committerGitHub <noreply@github.com>2018-11-05 00:24:14 -0500
commitff2a414ccc6300c704989f4ee030f0874083b801 (patch)
tree4b06d971db49c2992c7ced11be0f73a95f0d5ad3 /include/linux/sched.h
parentdb8cffeaed01c917863d3f12b0203615a303ab8e (diff)
parent770d75e7e543f1b8060805b602cce589e1072976 (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.h9
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;