mirror of
https://gitee.com/johng/gf
synced 2026-07-03 20:01:04 +08:00
19 lines
248 B
Go
19 lines
248 B
Go
package main
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/gogf/gf/os/glog"
|
|
"github.com/gogf/gf/os/gtimer"
|
|
)
|
|
|
|
func main() {
|
|
interval := time.Second
|
|
gtimer.AddSingleton(interval, func() {
|
|
glog.Println("doing")
|
|
time.Sleep(5 * time.Second)
|
|
})
|
|
|
|
select {}
|
|
}
|