1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 21:02:27 +08:00

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