MCPcopy Create free account
hub / github.com/facebook/time / SetSync

Function SetSync

clock/clock.go:116–125  ·  view source on GitHub ↗

SetSync sets clock status to TIME_OK

(clockid int32)

Source from the content-addressed store, hash-verified

114
115// SetSync sets clock status to TIME_OK
116func SetSync(clockid int32) error {
117 tx := &unix.Timex{}
118 tx.Modes = AdjStatus | AdjMaxError
119 state, err := unix.ClockAdjtime(clockid, tx)
120
121 if err == nil && state != unix.TIME_OK {
122 return fmt.Errorf("clock state %d is not TIME_OK after setting sync state", state)
123 }
124 return err
125}

Callers 2

phc2phcRunFunction · 0.92
SetSyncMethod · 0.92

Calls 1

ClockAdjtimeFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…