aboutsummaryrefslogtreecommitdiff
path: root/coarsetime.go
blob: 4679df6890cdbff74524f85167abd9dcc5403ab7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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)
}