summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-09 10:05:19 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-09 14:18:40 +0200
commit51f08b0b6aae175299b4e73d521343a4386a9cf7 (patch)
tree6966bc277671a1f62e9363a2a16fa7a2d6ccacd1 /modules
parent860c51c314e1f2b06b1424a3b277a2db96fc1f04 (diff)
Revise the use of htime.Since/htime.Now
We cannot (also, it doesn't add any value) use that when the `clock` is set, * To measure time (before that global is set) * To compare file timestamps re cache eviction Fixes #9868
Diffstat (limited to 'modules')
-rw-r--r--modules/collect.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/collect.go b/modules/collect.go
index 4f5b1c36f..ff83f9ecc 100644
--- a/modules/collect.go
+++ b/modules/collect.go
@@ -23,7 +23,6 @@ import (
"time"
"github.com/bep/debounce"
- "github.com/gohugoio/hugo/common/htime"
"github.com/gohugoio/hugo/common/loggers"
"github.com/spf13/cast"
@@ -506,7 +505,7 @@ func (c *collector) applyThemeConfig(tc *moduleAdapter) error {
}
func (c *collector) collect() {
- defer c.logger.PrintTimerIfDelayed(htime.Now(), "hugo: collected modules")
+ defer c.logger.PrintTimerIfDelayed(time.Now(), "hugo: collected modules")
d := debounce.New(2 * time.Second)
d(func() {
c.logger.Println("hugo: downloading modules …")