mirror of
https://github.com/status-im/go-waku.git
synced 2025-02-21 01:28:17 +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)
|
|
}
|