mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
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:
committed by
gVisor bot
parent
39a6242b54
commit
a8b2d2f4a9
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user