You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
464 B

  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. }