1
0
mirror of https://github.com/wyx2685/V2bX.git synced 2025-03-16 09:12:59 -04:00

15 lines
226 B
Go
Raw Normal View History

2023-07-22 18:57:34 +08:00
//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)
}