mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-02 23:27:31 -04:00
unix: unify TimespecToNsec and TimevalToNsec
All implementations of these functions are identical. Follow CL 30819 which did the same for syscall. Change-Id: I3c78f05ea12251306f3e100a006d266154a5238e Reviewed-on: https://go-review.googlesource.com/72378 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Ian Lance Taylor
parent
a57a2b53a1
commit
a1a1f1746d
@@ -11,8 +11,6 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
|
||||
|
||||
func NsecToTimespec(nsec int64) (ts Timespec) {
|
||||
ts.Sec = int32(nsec / 1e9)
|
||||
ts.Nsec = int32(nsec % 1e9)
|
||||
|
||||
Reference in New Issue
Block a user