mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-26 03:39:00 +00:00
20 lines
287 B
Go
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()
|
|
}
|