mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-02 23:27:31 -04:00
unix: add ClockGettime on *bsd and solaris
The same wrapper is already implemented on linux and darwin. Change-Id: Ia986fdfc28767356451d157e53f11e8d9ca86f2c Reviewed-on: https://go-review.googlesource.com/c/sys/+/456795 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Than McIntosh <thanm@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
committed by
Gopher Robot
parent
96e75de924
commit
cffae8ece4
@@ -521,6 +521,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