mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-31 14:26:40 -04:00
unix: add clock_gettime for Linux
Includes 386, amd64, and arm for Linux. Change-Id: I428bfb732141448659a94dc6e2ab7a98efea507a Reviewed-on: https://go-review.googlesource.com/9766 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: David Symonds <dsymonds@golang.org>
This commit is contained in:
committed by
David Symonds
parent
0a2b4af5eb
commit
f2654f8719
@@ -281,6 +281,16 @@ func Chroot(path string) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ClockGettime(clockid int32, time *Timespec) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Close(fd int) (err error) {
|
||||
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
|
||||
if e1 != 0 {
|
||||
|
||||
Reference in New Issue
Block a user