Remove logErrorAdjustment.

It's not necessary to log the error adjustment every time it happens. It's
sufficient to log it when the clock error is too large.

PiperOrigin-RevId: 696922088
This commit is contained in:
Nicolas Lacasse
2024-11-15 10:07:15 -08:00
committed by gVisor bot
parent 39a6242b54
commit a8b2d2f4a9
+1 -4
View File
@@ -126,16 +126,13 @@ func (c *CalibratedClock) updateParams(actual Parameters) {
c.resetLocked("Unable to update params: %v.", err)
return
}
logErrorAdjustment(c.ref.clockID, errorNS, c.params, newParams)
if errorNS.Magnitude() >= MaxClockError {
// We should never get such extreme error, something is very
// wrong. Reset everything and start again.
//
// N.B. logErrorAdjustment will have already logged the error
// at warning level.
//
// TODO(mpratt): We could allow Realtime clock jumps here.
log.Warningf("Clock(%v): error: %v ns, adjusted frequency from %v Hz to %v Hz", c.ref.clockID, errorNS, c.params.Frequency, newParams.Frequency)
c.resetLocked("Extreme clock error.")
return
}