Commit 90a75085 authored by Russ Cox's avatar Russ Cox

syscall: update darwin/amd64 for timespec change

Change-Id: I74f47f519dfee10cd079ad9a4e09e36e8d74c6dc
Reviewed-on: https://go-review.googlesource.com/30937
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 14e545b6
......@@ -6,17 +6,12 @@ package syscall
import "unsafe"
func NsecToTimespec(nsec int64) (ts Timespec) {
ts.Sec = nsec / 1e9
ts.Nsec = nsec % 1e9
return
func setTimespec(sec, nsec int64) Timespec {
return Timespec{Sec: int64(sec), Nsec: int64(nsec)}
}
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = int32(nsec % 1e9 / 1e3)
tv.Sec = int64(nsec / 1e9)
return
func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: int64(sec), Usec: int32(usec)}
}
//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment