mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-06 14:25:06 -05:00
Control offset correction rate in Linux driver
The kernel currently doesn't support a linear adjustment with programmable rate, extend the use of the kernel PLL with locked frequency instead. Set the PLL time constant according to the correction time corresponding to the correction rate and corrected offset. On kernels with nano PLL adjtime() is no longer used.
This commit is contained in:
@@ -207,13 +207,13 @@ TMX_EnableNanoPLL(void)
|
||||
}
|
||||
|
||||
int
|
||||
TMX_ApplyPLLOffset(long offset)
|
||||
TMX_ApplyPLLOffset(long offset, long constant)
|
||||
{
|
||||
struct timex txc;
|
||||
|
||||
txc.modes = ADJ_OFFSET | ADJ_TIMECONST | ADJ_NANO;
|
||||
txc.offset = offset;
|
||||
txc.constant = 0;
|
||||
txc.constant = constant;
|
||||
return adjtimex(&txc);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user