kon/vendor/github.com/valyala/fasthttp/coarsetime.go

14 lines
314 B
Go
Raw Permalink Normal View History

2024-07-02 16:36:04 +02:00
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)
}