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_386.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_386.go')
| -rw-r--r-- | src/syscall/syscall_linux_386.go | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/syscall/syscall_linux_386.go b/src/syscall/syscall_linux_386.go index 4f3c7c440a..b7b84b1c34 100644 --- a/src/syscall/syscall_linux_386.go +++ b/src/syscall/syscall_linux_386.go @@ -14,16 +14,12 @@ const ( _SYS_getdents = SYS_GETDENTS64 ) -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) 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 = int32(nsec / 1e9) |
