diff options
Diffstat (limited to 'src/pkg/syscall/syscall_darwin_amd64.go')
-rw-r--r-- | src/pkg/syscall/syscall_darwin_amd64.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/syscall/syscall_darwin_amd64.go b/src/pkg/syscall/syscall_darwin_amd64.go index 7662b200d..941124fb7 100644 --- a/src/pkg/syscall/syscall_darwin_amd64.go +++ b/src/pkg/syscall/syscall_darwin_amd64.go @@ -9,8 +9,8 @@ func Getpagesize() int { return 4096 } func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func NsecToTimespec(nsec int64) (ts Timespec) { - ts.Sec = nsec/1e9; - ts.Nsec = nsec%1e9; + ts.Sec = nsec / 1e9; + ts.Nsec = nsec % 1e9; return; } @@ -18,8 +18,8 @@ func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec) func NsecToTimeval(nsec int64) (tv Timeval) { nsec += 999; // round up to microsecond - tv.Usec = int32(nsec%1e9/1e3); - tv.Sec = int64(nsec/1e9); + tv.Usec = int32(nsec % 1e9 / 1e3); + tv.Sec = int64(nsec / 1e9); return; } |