From 8d041fa896f94f02b85322f6a732c0c3299e87b5 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Sun, 2 Jul 2023 12:23:35 -0600 Subject: [PATCH] Added SetTimeout back to Thread --- thread.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/thread.go b/thread.go index d30682f..1aa33ca 100644 --- a/thread.go +++ b/thread.go @@ -334,6 +334,7 @@ type Thread interface { Action(action string) (ThreadAction, bool) Handler(signal_type string) (ThreadHandler, bool) + SetTimeout(end time.Time) Timeout() <-chan time.Time ClearTimeout() @@ -516,8 +517,8 @@ func (thread * BaseThread) ClearTimeout() { thread.timeout_chan = nil } -func (thread * BaseThread) SetTimeout(timeout time.Time) { - thread.timeout_chan = time.After(time.Until(timeout)) +func (thread * BaseThread) SetTimeout(end time.Time) { + thread.timeout_chan = time.After(time.Until(end)) } var ThreadDefaultStart = func(ctx * GraphContext, thread Thread) (string, error) {