From 393bc776556baeeb67585334f4bcb2dfa5abc847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Thu, 13 Jan 2022 22:20:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E4=BD=BF=E7=94=A8=E6=AF=AB?= =?UTF-8?q?=E7=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gin/util/responsed.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gin/util/responsed.go b/gin/util/responsed.go index fd23359..9fbb27c 100644 --- a/gin/util/responsed.go +++ b/gin/util/responsed.go @@ -27,7 +27,7 @@ func Response(ctx *gin.Context, code interface{}, message string, data interface "message": message, "data": data, "trace_id": ctx.GetString("trace_id"), - "cost": time.Since(time.Unix(ctx.GetInt64("start_time"), 0)).Seconds(), + "cost": time.Since(time.Unix(ctx.GetInt64("start_time"), 0)).Milliseconds(), } ctx.JSON(http.StatusOK, responseData) }