aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/syscall_windows_test.go
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2015-11-23 15:26:00 +1100
committerAlex Brainman <alex.brainman@gmail.com>2015-11-24 01:11:58 +0000
commitab4c9298b8185a056ff1152f2c7bd9b38d3d06f3 (patch)
tree476b6ddea89d3796c86576bd4af0547c380ec49a /src/runtime/syscall_windows_test.go
parentb5fe07710f4a31bfc100fbc2e344be11e4b4d3fc (diff)
downloadgo-ab4c9298b8185a056ff1152f2c7bd9b38d3d06f3.tar.gz
go-ab4c9298b8185a056ff1152f2c7bd9b38d3d06f3.zip
runtime: do not call timeBeginPeriod on windows
Calling timeBeginPeriod changes Windows global timer resolution from 15ms to 1ms. This used to improve Go runtime scheduler performance, but not anymore. Thanks to @aclements, scheduler now behaves the same way if we call timeBeginPeriod or not. Remove call to timeBeginPeriod, since it is machine global resource, and there are downsides of using low timer resolution. See issue #8687 for details. Fixes #8687 Change-Id: Ib7e41aa4a81861b62a900e0e62776c9ef19bfb73 Reviewed-on: https://go-review.googlesource.com/17164 Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Yasuhiro MATSUMOTO <mattn.jp@gmail.com> Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
Diffstat (limited to 'src/runtime/syscall_windows_test.go')
-rw-r--r--src/runtime/syscall_windows_test.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/runtime/syscall_windows_test.go b/src/runtime/syscall_windows_test.go
index 8b9945b22d..30630bc904 100644
--- a/src/runtime/syscall_windows_test.go
+++ b/src/runtime/syscall_windows_test.go
@@ -642,13 +642,6 @@ uintptr_t cfunc(callback f, uintptr_t n) {
}
}
-func TestTimeBeginPeriod(t *testing.T) {
- const TIMERR_NOERROR = 0
- if *runtime.TimeBeginPeriodRetValue != TIMERR_NOERROR {
- t.Fatalf("timeBeginPeriod failed: it returned %d", *runtime.TimeBeginPeriodRetValue)
- }
-}
-
// removeOneCPU removes one (any) cpu from affinity mask.
// It returns new affinity mask.
func removeOneCPU(mask uintptr) (uintptr, error) {