mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-05-17 00:26:36 +03:00
Move the synctest-related implementation into a separate file protected with go:build goexperiment.synctest.
This is a follow-up for the commit 06c26315df
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/8740
16 lines
391 B
Go
16 lines
391 B
Go
package fasttime
|
|
|
|
// UnixDate returns date from the current unix timestamp.
|
|
//
|
|
// The date is calculated by dividing unix timestamp by (24*3600)
|
|
func UnixDate() uint64 {
|
|
return UnixTimestamp() / (24 * 3600)
|
|
}
|
|
|
|
// UnixHour returns hour from the current unix timestamp.
|
|
//
|
|
// The hour is calculated by dividing unix timestamp by 3600
|
|
func UnixHour() uint64 {
|
|
return UnixTimestamp() / 3600
|
|
}
|