DelayNoMore/battle_srv/common/utils/time.go

20 lines
287 B
Go
Raw Normal View History

2022-09-20 15:50:01 +00:00
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()
}