mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-06 05:30:08 +00:00
update deps
This commit is contained in:
14
common/systime/time_unix.go
Normal file
14
common/systime/time_unix.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user