]> Cypherpunks repositories - gostls13.git/commit
cgo/misc/test: burn CPU to improve sleep accuracy
authorDave Cheney <dave@cheney.net>
Fri, 31 Aug 2012 10:17:59 +0000 (20:17 +1000)
committerDave Cheney <dave@cheney.net>
Fri, 31 Aug 2012 10:17:59 +0000 (20:17 +1000)
commitd073677569085642935d5d3b6acfe6df1054ae21
treedde0852423be39af95134e02a940562f86f045ca
parent11d75fb62ee5fa46d33845b768980060e837f9db
cgo/misc/test: burn CPU to improve sleep accuracy

Fixes #4008.

Run a background goroutine that wastes CPU to trick the
power management into raising the CPU frequency which,
by side effect, makes sleep more accurate on arm.

=== RUN TestParallelSleep
--- PASS: TestParallelSleep (1.30 seconds)
_cgo_gotypes.go:772:    sleep(1) slept for 1.000458s

R=minux.ma, r
CC=golang-dev
https://golang.org/cl/6498060
misc/cgo/test/issue1560.go