func getRawMonoTime() (int64, int64) { var timeSpec syscall.Timespec syscall.Syscall(syscall.SYS_CLOCK_GETTIME, CLOCK_MONOTONIC_RAW, uintptr(unsafe.Pointer(&timeSpec)), 0) sec, nsec := timeSpec.Unix() return sec, nsec }
func timeFromTimespec(ts syscall.Timespec) time.Time { sec, nsec := ts.Unix() return time.Unix(sec, nsec) }
func toTime(src syscall.Timespec) time.Time { sec, nsec := src.Unix() return time.Unix(sec, nsec) }