1
0
mirror of https://github.com/golang/go synced 2024-11-21 21:34:40 -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:
Alex Brainman 2010-09-10 15:39:45 +10:00
parent 781462dc46
commit f5089ffff4

View File

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