mirror of
https://github.com/logos-messaging/logos-messaging-go.git
synced 2026-01-07 08:23:06 +00:00
12 lines
211 B
Go
12 lines
211 B
Go
package utils
|
|
|
|
import "time"
|
|
|
|
func GetUnixEpochFrom(now func() time.Time) float64 {
|
|
return float64(now().UnixNano()) / float64(time.Second)
|
|
}
|
|
|
|
func GetUnixEpoch() float64 {
|
|
return GetUnixEpochFrom(time.Now)
|
|
}
|