From d4bba76dc828ffa7e962b9b3361fbec8078c9dc0 Mon Sep 17 00:00:00 2001 From: dudaodong Date: Mon, 9 Jan 2023 11:25:14 +0800 Subject: [PATCH] fix: fix ExampleSchedule failed --- function/function_example_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/function/function_example_test.go b/function/function_example_test.go index 5c6894d..5350273 100644 --- a/function/function_example_test.go +++ b/function/function_example_test.go @@ -114,15 +114,15 @@ func ExampleSchedule() { count++ } - stop := Schedule(1*time.Second, increase) + stop := Schedule(2*time.Second, increase) - time.Sleep(3 * time.Second) + time.Sleep(2 * time.Second) close(stop) fmt.Println(count) // Output: - // 3 + // 2 } func ExamplePipeline() {