diff options
Diffstat (limited to 'libgo/go/syscall/syscall.go')
-rw-r--r-- | libgo/go/syscall/syscall.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libgo/go/syscall/syscall.go b/libgo/go/syscall/syscall.go index ad9df6c..f777197 100644 --- a/libgo/go/syscall/syscall.go +++ b/libgo/go/syscall/syscall.go @@ -34,3 +34,11 @@ var _zero uintptr var dummy *byte const sizeofPtr uintptr = uintptr(unsafe.Sizeof(dummy)) + +func (ts *Timespec) Unix() (sec int64, nsec int64) { + return int64(ts.Sec), int64(ts.Nsec) +} + +func (tv *Timeval) Unix() (sec int64, nsec int64) { + return int64(tv.Sec), int64(tv.Usec) * 1000 +} |