diff options
| author | Ian Lance Taylor <iant@golang.org> | 2016-10-11 14:20:50 -0700 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2016-10-11 22:58:57 +0000 |
| commit | 7f6eadb64fb16e73b15630dd3089edc568d047cb (patch) | |
| tree | f606425c8941b90045f16df5fff4ea6590b142b1 /src/syscall/syscall_linux_amd64.go | |
| parent | e1fc292500aa70c265937aebad00ac010031cbaf (diff) | |
| download | go-7f6eadb64fb16e73b15630dd3089edc568d047cb.tar.xz | |
syscall: unify TimespecToNsec and TimevalToNsec
All implementations of these functions are identical.
Change-Id: I7cbea53c02bb0cee75e30beed19d29ba0a7ef657
Reviewed-on: https://go-review.googlesource.com/30819
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/syscall/syscall_linux_amd64.go')
| -rw-r--r-- | src/syscall/syscall_linux_amd64.go | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/syscall/syscall_linux_amd64.go b/src/syscall/syscall_linux_amd64.go index 119204b70b..faa973dbdf 100644 --- a/src/syscall/syscall_linux_amd64.go +++ b/src/syscall/syscall_linux_amd64.go @@ -84,16 +84,12 @@ func Time(t *Time_t) (tt Time_t, err error) { return Time_t(tv.Sec), nil } -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 return } -func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } - func NsecToTimeval(nsec int64) (tv Timeval) { nsec += 999 // round up to microsecond tv.Sec = nsec / 1e9 |
