From 99fb0dc1b17b5f203334b92d8af4761aff51b5c1 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 1 Feb 2017 21:23:03 +0000 Subject: [PATCH] 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 --- src/testing/testing.go | 7 +++++++ 1 file changed, 7 insertions(+) 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) -- 2.50.0