gccgo_linux_amd64.go 464 B

123456789101112131415161718192021
  1. // Copyright 2015 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. //go:build gccgo && linux && amd64
  5. // +build gccgo,linux,amd64
  6. package unix
  7. import "syscall"
  8. //extern gettimeofday
  9. func realGettimeofday(*Timeval, *byte) int32
  10. func gettimeofday(tv *Timeval) (err syscall.Errno) {
  11. r := realGettimeofday(tv, nil)
  12. if r < 0 {
  13. return syscall.GetErrno()
  14. }
  15. return 0
  16. }