fix: fix ExampleSchedule failed

This commit is contained in:
dudaodong
2023-01-09 11:25:14 +08:00
parent adaa3ebc43
commit d4bba76dc8

View File

@@ -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() {