diff options
author | John Stultz <john.stultz@linaro.org> | 2011-02-01 13:52:17 +0000 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-02 15:28:18 +0100 |
commit | c528f7c6c208f1fae6b4025957173dec045e5f21 (patch) | |
tree | 86986bf39f82622ea81179dad3382fc4580875a8 /include/linux/time.h | |
parent | 0061748dd2400d0bcd4d49d258db5d7b5d106ca0 (diff) | |
download | linux-stable-c528f7c6c208f1fae6b4025957173dec045e5f21.tar.gz linux-stable-c528f7c6c208f1fae6b4025957173dec045e5f21.tar.bz2 linux-stable-c528f7c6c208f1fae6b4025957173dec045e5f21.zip |
time: Introduce timekeeping_inject_offset
This adds a kernel-internal timekeeping interface to add or subtract
a fixed amount from CLOCK_REALTIME. This makes it so kernel users or
interfaces trying to do so do not have to read the time, then add an
offset and then call settimeofday(), which adds some extra error in
comparision to just simply adding the offset in the kernel timekeeping
core.
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
LKML-Reference: <20110201134419.584311693@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/time.h')
-rw-r--r-- | include/linux/time.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/time.h b/include/linux/time.h index 7c44e7778033..379b9037b5b4 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -166,6 +166,7 @@ extern struct timespec timespec_trunc(struct timespec t, unsigned gran); extern int timekeeping_valid_for_hres(void); extern u64 timekeeping_max_deferment(void); extern void timekeeping_leap_insert(int leapsecond); +extern int timekeeping_inject_offset(struct timespec *ts); struct tms; extern void do_sys_times(struct tms *); |