14 lines
220 B
Go
14 lines
220 B
Go
package misc
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestScheduleTimerFuncByInterval(t *testing.T) {
|
|
ScheduleTimerFuncByInterval(func() {
|
|
t.Log(time.Now())
|
|
}, time.Second, 7*time.Second)
|
|
time.Sleep(30 * time.Second)
|
|
}
|