]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: fix windows Gettimeofday
authorAlex Brainman <alex.brainman@gmail.com>
Fri, 10 Sep 2010 05:39:45 +0000 (15:39 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Fri, 10 Sep 2010 05:39:45 +0000 (15:39 +1000)
Fixes #1092.

R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/2121048

src/pkg/syscall/syscall_windows.go

index 366a482d2916399b0078e56bb591ae7d7cd7f58f..62990440b50e47f8a4a0881851bae0c047a37b37 100644 (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
 }