mirror of
https://github.com/duke-git/lancet.git
synced 2025-10-06 16:06:54 +08:00
fix: fix ExampleSchedule failed
This commit is contained in:
@@ -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() {
|
||||
|
Reference in New Issue
Block a user