Skip to content

Commit b5d4f28

Browse files
jfyuenk8s-infra-cherrypick-robot
authored andcommitted
custom-error-pages: use time.Since
1 parent 2dfe726 commit b5d4f28

File tree

1 file changed

+1
-1
lines changed
  • images/custom-error-pages/rootfs

1 file changed

+1
-1
lines changed

images/custom-error-pages/rootfs/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ func errorHandler(path, defaultFormat string) func(http.ResponseWriter, *http.Re
180180
w.WriteHeader(code)
181181
io.Copy(w, f)
182182

183-
duration := time.Now().Sub(start).Seconds()
183+
duration := time.Since(start).Seconds()
184184

185185
proto := strconv.Itoa(r.ProtoMajor)
186186
proto = fmt.Sprintf("%s.%s", proto, strconv.Itoa(r.ProtoMinor))

0 commit comments

Comments
 (0)