From 0435e88a119fd057aa7209591ba3dff122c9f24c Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 18 Mar 2016 10:56:23 +0100 Subject: runtime: revert "do not call timeBeginPeriod on windows" This reverts commit ab4c9298b8185a056ff1152f2c7bd9b38d3d06f3. Sysmon critically depends on system timer resolution for retaking of Ps blocked in system calls. See #14790 for an example of a program where execution time goes from 2ms to 30ms if timeBeginPeriod(1) is not used. We can remove timeBeginPeriod(1) when we support UMS (#7876). Update #14790 Change-Id: I362b56154359b2c52d47f9f2468fe012b481cf6d Reviewed-on: https://go-review.googlesource.com/20834 Reviewed-by: Austin Clements Run-TryBot: Dmitry Vyukov TryBot-Result: Gobot Gobot Reviewed-by: Alex Brainman --- src/runtime/export_windows_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/runtime/export_windows_test.go') diff --git a/src/runtime/export_windows_test.go b/src/runtime/export_windows_test.go index 66c103709c..536b398fd7 100644 --- a/src/runtime/export_windows_test.go +++ b/src/runtime/export_windows_test.go @@ -8,8 +8,11 @@ package runtime import "unsafe" -var TestingWER = &testingWER -var OsYield = osyield +var ( + TestingWER = &testingWER + OsYield = osyield + TimeBeginPeriodRetValue = &timeBeginPeriodRetValue +) func NumberOfProcessors() int32 { var info systeminfo -- cgit v1.3