DelayNoMore/battle_srv/common/utils/time.go
2022-09-20 23:52:55 +08:00

20 lines
287 B
Go

package utils
import "time"
func UnixtimeNano() int64 {
return time.Now().UnixNano()
}
func UnixtimeMicro() int64 {
return time.Now().UnixNano() / 1000
}
func UnixtimeMilli() int64 {
return time.Now().UnixNano() / 1000000
}
func UnixtimeSec() int64 {
return time.Now().Unix()
}