summaryrefslogtreecommitdiffstats
path: root/tpl/partials
diff options
context:
space:
mode:
authorsatotake <doublequotation@gmail.com>2022-04-27 02:57:04 +0900
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-08 16:56:26 +0200
commite77ca3c105bd64c5077d823d2127f6f812a4f681 (patch)
treeebbe9c310bfab1e34f9fd2e36b738fd2a37d6f11 /tpl/partials
parentf2946da9e806c2bafbdd26707fe339db79bd980b (diff)
Add `clock` cli flag
Close #8787
Diffstat (limited to 'tpl/partials')
-rw-r--r--tpl/partials/partials.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tpl/partials/partials.go b/tpl/partials/partials.go
index eb4ebfe32..9ded32a71 100644
--- a/tpl/partials/partials.go
+++ b/tpl/partials/partials.go
@@ -25,8 +25,8 @@ import (
"reflect"
"strings"
"sync"
- "time"
+ "github.com/gohugoio/hugo/common/htime"
texttemplate "github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate"
"github.com/gohugoio/hugo/helpers"
@@ -222,7 +222,7 @@ func createKey(name string, variants ...any) (partialCacheKey, error) {
var errUnHashable = errors.New("unhashable")
func (ns *Namespace) getOrCreate(ctx context.Context, key partialCacheKey, context any) (result any, err error) {
- start := time.Now()
+ start := htime.Now()
defer func() {
if r := recover(); r != nil {
err = r.(error)