summaryrefslogtreecommitdiffstats
path: root/tpl/tplimpl
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/tplimpl
parentf2946da9e806c2bafbdd26707fe339db79bd980b (diff)
Add `clock` cli flag
Close #8787
Diffstat (limited to 'tpl/tplimpl')
-rw-r--r--tpl/tplimpl/template.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tpl/tplimpl/template.go b/tpl/tplimpl/template.go
index c092ff638..d352f02e8 100644
--- a/tpl/tplimpl/template.go
+++ b/tpl/tplimpl/template.go
@@ -27,10 +27,10 @@ import (
"sort"
"strings"
"sync"
- "time"
"unicode"
"unicode/utf8"
+ "github.com/gohugoio/hugo/common/htime"
"github.com/gohugoio/hugo/common/types"
"github.com/gohugoio/hugo/helpers"
@@ -235,7 +235,7 @@ func (t *templateExec) ExecuteWithContext(ctx context.Context, templ tpl.Templat
defer rlocker.RUnlock()
}
if t.Metrics != nil {
- defer t.Metrics.MeasureSince(templ.Name(), time.Now())
+ defer t.Metrics.MeasureSince(templ.Name(), htime.Now())
}
if t.templateUsageTracker != nil {