]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: burn cpu before calling yield in windows runtime.systime
authorAlex Brainman <alex.brainman@gmail.com>
Wed, 6 Aug 2014 07:24:03 +0000 (17:24 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Wed, 6 Aug 2014 07:24:03 +0000 (17:24 +1000)
LGTM=dvyukov
R=golang-codereviews, dvyukov
CC=golang-codereviews
https://golang.org/cl/117670043

src/pkg/runtime/os_windows.c

index ee6eed002f4e9d7e5d903970a06c61a059f41697..1dc0780ba9ba9ea21f0217c36045e9c73bf913fd 100644 (file)
@@ -280,7 +280,7 @@ runtime·systime(KSYSTEM_TIME *timeaddr)
        KSYSTEM_TIME t;
        int32 i;
 
-       for(i = 0; i < 10000; i++) {
+       for(i = 1; i < 10000; i++) {
                // these fields must be read in that order (see URL above)
                t.High1Time = timeaddr->High1Time;
                t.LowPart = timeaddr->LowPart;