MCPcopy Create free account
hub / github.com/OpenSN-Library/OpenSN-Library / SetSystemTime

Function SetSystemTime

daemon/utils/sys.go:13–20  ·  view source on GitHub ↗
(seconds int64, nanoseconds int64)

Source from the content-addressed store, hash-verified

11}
12
13func SetSystemTime(seconds int64, nanoseconds int64) error {
14 ts := timespec{Sec: seconds, Nsec: nanoseconds}
15 _, _, errno := syscall.Syscall(syscall.SYS_CLOCK_SETTIME, 0, uintptr(unsafe.Pointer(&ts)), 0)
16 if errno != 0 {
17 return errno
18 }
19 return nil
20}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected