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) }