1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

v.util: simplify the sorting of v's timing output

This commit is contained in:
Delyan Angelov
2020-12-19 12:49:28 +02:00
parent a1c81aa49d
commit 2f1cc2bd08
4 changed files with 8 additions and 6 deletions

View File

@@ -37,8 +37,8 @@ pub fn (mut t Timers) measure(name string) i64 {
pub fn (mut t Timers) message(name string) string {
ms := f64(t.measure(name)) / 1000.0
value := bold('${ms:.3f}')
formatted_message := '$name: $value ms'
value := bold('${ms:-8.3f}')
formatted_message := '$value ms $name'
return formatted_message
}