From c58b1cbf8a9215a4bd71685db4a285f4e99747fe Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Sun, 10 Jan 2016 08:12:10 -0800 Subject: [PATCH] Add ThrottleTimer.Unset --- throttle_timer.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/throttle_timer.go b/throttle_timer.go index 0b40a60c2..5442d0cd8 100644 --- a/throttle_timer.go +++ b/throttle_timer.go @@ -46,6 +46,10 @@ func (t *ThrottleTimer) Set() { } } +func (t *ThrottleTimer) Unset() { + t.timer.Stop() +} + // For ease of .Stop()'ing services before .Start()'ing them, // we ignore .Stop()'s on nil ThrottleTimers func (t *ThrottleTimer) Stop() bool {