From: Brad Fitzpatrick Date: Wed, 1 Feb 2017 21:23:03 +0000 (+0000) Subject: Revert "testing: delete unused stopAlarm()" X-Git-Tag: go1.9beta1~1813 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=99fb0dc1b17b5f203334b92d8af4761aff51b5c1;p=gostls13.git Revert "testing: delete unused stopAlarm()" This reverts commit ed8c62b7fb47b717dc2adc9f6d0c90c924c67712. Turns out it was needed in later commits. Change-Id: I07a7bc2429976d8a5a89f915a11625c118b85500 Reviewed-on: https://go-review.googlesource.com/36113 Run-TryBot: Brad Fitzpatrick Reviewed-by: Joe Tsai --- diff --git a/src/testing/testing.go b/src/testing/testing.go index b4dd40f36b..5efbc244fe 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -1027,6 +1027,13 @@ func startAlarm() { } } +// stopAlarm turns off the alarm. +func stopAlarm() { + if *timeout > 0 { + timer.Stop() + } +} + func parseCpuList() { for _, val := range strings.Split(*cpuListStr, ",") { val = strings.TrimSpace(val)