mirror of
https://github.com/hanzoai/metrics.git
synced 2026-10-30 20:03:39 +00:00
14 lines
260 B
Go
14 lines
260 B
Go
//go:build synctest
|
|
|
|
package fasttime
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// UnixTimestamp returns the current unix timestamp in seconds.
|
|
func UnixTimestamp() uint64 {
|
|
// Fall back to time.Now().Unix(), since this is needed for synctest.
|
|
return uint64(time.Now().Unix())
|
|
}
|