Messages in this thread | | | Date | Mon, 06 May 2013 17:05:26 +0200 | From | Alexander Holler <> | Subject | Re: adjusting the monotonic system time (from inside the kernel) |
| |
Am 06.05.2013 16:02, schrieb Alexander Holler:
> > But I would prefer the following: > > hw-clock --> kernel -> system-time > > Problem is that the hw-clock in question doesn't offer something like a > tick. It just might send a timestamp with millisecond precision whenever > it wants. > > Because I don't want to reinvent the wheel and because I think there are > some people which already have spend some thoughts on similiar things, > I'm asking here before I try to implement something which then never > might find it's way into the mainline kernel. > > Any hints, suggestions, whatever?
To offer something for discussion I'm thinking about:
When a timestamp with millisecond precision is received, instruct the kernel to adjust the system time in the next minute for the calculated offset.
Question here would be what to choose as window to adjust the time (the "next minute" above"). I think that should depend on the offset. But what are acceptable values? One minute to adjust the clock for offsets up to +-500ms? Two minutes if the offset is one second? ...
As I never spend a thought about such before, I just don't have any pointers what would be acceptable.
Regards,
Alexander
| |