mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-22 04:48:45 +08:00
17 lines
193 B
Go
17 lines
193 B
Go
package cron
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestCron(t *testing.T) {
|
|
c := NewCron(time.Second)
|
|
c.Do(func() {
|
|
t.Logf("cron log")
|
|
})
|
|
time.Sleep(time.Second * 3)
|
|
c.Stop()
|
|
c.Stop()
|
|
}
|