mirror of
https://gitee.com/johng/gf
synced 2026-07-07 06:15:15 +08:00
22 lines
381 B
Go
22 lines
381 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"gitee.com/johng/gf/g/os/gtime"
|
|
"time"
|
|
"gitee.com/johng/gf/g/os/gfile"
|
|
)
|
|
|
|
func main() {
|
|
|
|
gtime.SetInterval(10*time.Millisecond, func() bool {
|
|
path := "./temp.txt"
|
|
gfile.PutBinContentsAppend(path, []byte("1"))
|
|
fmt.Println(gfile.MTimeMillisecond(path))
|
|
return true
|
|
})
|
|
|
|
time.Sleep(time.Hour)
|
|
|
|
}
|