diff --git a/event.go b/event.go index 8d0a9b2..f0e211b 100644 --- a/event.go +++ b/event.go @@ -73,6 +73,7 @@ type Event interface { RequiredResources() []Resource DoneResource() Resource SetTimeout(end_time time.Time, action string) + ClearTimeout() Timeout() <-chan time.Time TimeoutAction() string Signal() chan GraphSignal @@ -95,6 +96,11 @@ func (event * BaseEvent) Timeout() <-chan time.Time { return event.timeout } +func (event * BaseEvent) ClearTimeout() { + event.timeout_action = "" + event.timeout = nil +} + func (event * BaseEvent) SetTimeout(end_time time.Time, action string) { event.timeout_action = action event.timeout = time.After(time.Until(end_time))