mirror of
https://github.com/golang/go
synced 2024-11-22 03:44:39 -07:00
syscall: fix windows Gettimeofday
Fixes #1092. R=golang-dev, r2 CC=golang-dev https://golang.org/cl/2121048
This commit is contained in:
parent
781462dc46
commit
f5089ffff4
@ -393,7 +393,7 @@ func Gettimeofday(tv *Timeval) (errno int) {
|
||||
ms := ft.Microseconds()
|
||||
// split into sec / usec
|
||||
tv.Sec = int32(ms / 1e6)
|
||||
tv.Usec = int32(ms) - tv.Sec
|
||||
tv.Usec = int32(ms) - tv.Sec*1e6
|
||||
return 0
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user