Home | History | Annotate | Download | only in syscall

Lines Matching refs:nsec

11 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
15 func NsecToTimespec(nsec int64) Timespec {
16 sec := nsec / 1e9
17 nsec = nsec % 1e9
18 if nsec < 0 {
19 nsec += 1e9
22 return setTimespec(sec, nsec)
31 func NsecToTimeval(nsec int64) Timeval {
32 nsec += 999 // round up to microsecond
33 usec := nsec % 1e9 / 1e3
34 sec := nsec / 1e9