diff options
author | satotake <doublequotation@gmail.com> | 2022-04-27 02:57:04 +0900 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-05-08 16:56:26 +0200 |
commit | e77ca3c105bd64c5077d823d2127f6f812a4f681 (patch) | |
tree | ebbe9c310bfab1e34f9fd2e36b738fd2a37d6f11 /tpl/tplimpl | |
parent | f2946da9e806c2bafbdd26707fe339db79bd980b (diff) |
Add `clock` cli flag
Close #8787
Diffstat (limited to 'tpl/tplimpl')
-rw-r--r-- | tpl/tplimpl/template.go | 4 |
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 { |