coarsetime.go 314 B

12345678910111213
  1. package fasthttp
  2. import (
  3. "time"
  4. )
  5. // CoarseTimeNow returns the current time truncated to the nearest second.
  6. //
  7. // Deprecated: This is slower than calling time.Now() directly.
  8. // This is now time.Now().Truncate(time.Second) shortcut.
  9. func CoarseTimeNow() time.Time {
  10. return time.Now().Truncate(time.Second)
  11. }