mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
14 lines
314 B
Go
14 lines
314 B
Go
|
package fasthttp
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
// CoarseTimeNow returns the current time truncated to the nearest second.
|
||
|
//
|
||
|
// Deprecated: This is slower than calling time.Now() directly.
|
||
|
// This is now time.Now().Truncate(time.Second) shortcut.
|
||
|
func CoarseTimeNow() time.Time {
|
||
|
return time.Now().Truncate(time.Second)
|
||
|
}
|