void init_cpu_timer(void);
unsigned long long monotonic_clock(void);
+ void tod_to_timeval(__u64, struct timespec *);
+
+ static inline
+ void stck_to_timespec(unsigned long long stck, struct timespec *ts)
+ {
+ tod_to_timeval(stck - TOD_UNIX_EPOCH, ts);
+ }
+
extern u64 sched_clock_base_cc;
+/**
+ * get_clock_monotonic - returns current time in clock rate units
+ *
+ * The caller must ensure that preemption is disabled.
+ * The clock and sched_clock_base get changed via stop_machine.
+ * Therefore preemption must be disabled when calling this
+ * function, otherwise the returned value is not guaranteed to
+ * be monotonic.
+ */
+static inline unsigned long long get_clock_monotonic(void)
+{
+ return get_clock_xt() - sched_clock_base_cc;
+}
+
#endif