Hi Guys, so i have this small go program which works fine under linux... 
but there's some very strange issue with getting microsecond-precision time 
under windows7. 

https://play.golang.org/p/N9F7xpx7hEr

It won't run properly under playground so let me just paste here so you can 
see the behaviour im observing, the format is milliseconds [dot] 
microseconds [space] raw value

Linux:
Took:  0 . 0 107
Took:  0 . 108 108383
Took:  0 . 204 204381
Took:  0 . 300 300110
Took:  0 . 395 395757
Took:  0 . 499 499740
Took:  0 . 597 597277
Took:  0 . 692 692953
Took:  0 . 788 788634
Took:  0 . 884 884278
Took:  0 . 979 979904
Took:  1 . 75 1075548
Took:  1 . 171 1171267

Windows:

Took: 0 . 0 raw: 0

Took: 0 . 0 raw: 0

Took: 0 . 0 raw: 0

Took: 0 . 0 raw: 0

Took: 0 . 0 raw: 0

Took: 0 . 0 raw: 0

Took: 1 . 0 raw: 1000000

Took: 1 . 0 raw: 1000000

Took: 1 . 0 raw: 1000000

Took: 1 . 0 raw: 1000000

Took: 1 . 0 raw: 1000000

Took: 1 . 0 raw: 1000000

Took: 2 . 0 raw: 2000100

Took: 2 . 0 raw: 2000100

Took: 2 . 0 raw: 2000100

Took: 2 . 0 raw: 2000100

Took: 2 . 0 raw: 2000100

Took: 2 . 0 raw: 2000100

Took: 2 . 0 raw: 2000100

Took: 2 . 0 raw: 2000100

Took: 2 . 0 raw: 2000100

Took: 2 . 0 raw: 2000100

Took: 3 . 0 raw: 3000100

Took: 3 . 0 raw: 3000100

Took: 3 . 0 raw: 3000100

Took: 3 . 0 raw: 3000100

Took: 3 . 0 raw: 3000100

Took: 3 . 0 raw: 3000100

Took: 3 . 0 raw: 3000100

Took: 3 . 0 raw: 3000100

Took: 3 . 0 raw: 3000100

Took: 3 . 0 raw: 3000100

Took: 4 . 0 raw: 4000200

Took: 4 . 0 raw: 4000200

Took: 4 . 0 raw: 4000200


So in linux the microsecond part is incremented correctly. In windows the 
milliseconds part is incremented correctly but for the microseconds part it 
seems it's just adding 0.1 microsecond for each millisecond elapsed, so the 
readings are off. Any idea why it's working this way, can it be fixed 
somehow?



-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to