update deps

This commit is contained in:
Yuzuki616
2023-07-22 18:57:34 +08:00
parent c48c9c65ab
commit 94bfaf14b9
9 changed files with 144 additions and 121 deletions

View File

@@ -0,0 +1,14 @@
//go:build linux || darwin
package systime
import (
"time"
"golang.org/x/sys/unix"
)
func SetSystemTime(nowTime time.Time) error {
timeVal := unix.NsecToTimeval(nowTime.UnixNano())
return unix.Settimeofday(&timeVal)
}