File: coarsetime.go

package info (click to toggle)
golang-github-valyala-fasthttp 1%3A1.67.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,956 kB
  • sloc: makefile: 34
file content (13 lines) | stat: -rw-r--r-- 314 bytes parent folder | download | duplicates (3)
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)
}