metric milliseconds computation with golang original method (#11403)

Signed-off-by: Icarus9913 <icaruswu66@qq.com>
This commit is contained in:
Icarus Wu 2023-11-16 21:50:23 +08:00 committed by GitHub
parent 808a6e9226
commit 369a4c4bfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -839,7 +839,7 @@ var GatewayNodeViews = append([]*view.View{
// SinceInMilliseconds returns the duration of time since the provide time as a float64.
func SinceInMilliseconds(startTime time.Time) float64 {
return float64(time.Since(startTime).Nanoseconds()) / 1e6
return float64(time.Since(startTime).Milliseconds())
}
// Timer is a function stopwatch, calling it starts the timer,