mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v,gen,checker: implement -d time_checking -d time_cgening -d time_v
This commit is contained in:
@@ -31,13 +31,13 @@ pub fn (mut t Timers) measure(name string) i64 {
|
||||
eprintln('> Available timers:')
|
||||
eprintln('> $timer_keys')
|
||||
}
|
||||
ms := t.swatches[name].elapsed().milliseconds()
|
||||
ms := t.swatches[name].elapsed().microseconds()
|
||||
return ms
|
||||
}
|
||||
|
||||
pub fn (mut t Timers) message(name string) string {
|
||||
ms := t.measure(name)
|
||||
value := bold('$ms')
|
||||
ms := f64(t.measure(name)) / 1000.0
|
||||
value := bold('${ms:.3f}')
|
||||
formatted_message := '$name: $value ms'
|
||||
return formatted_message
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user