时间使用毫秒
This commit is contained in:
parent
940d9f327e
commit
393bc77655
@ -27,7 +27,7 @@ func Response(ctx *gin.Context, code interface{}, message string, data interface
|
|||||||
"message": message,
|
"message": message,
|
||||||
"data": data,
|
"data": data,
|
||||||
"trace_id": ctx.GetString("trace_id"),
|
"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)
|
ctx.JSON(http.StatusOK, responseData)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user