mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tools/fast: fix unused var, use Stopwatch, .gitignore
This commit is contained in:
parent
af334e320c
commit
5f7a8df885
4
cmd/tools/fast/.gitignore
vendored
4
cmd/tools/fast/.gitignore
vendored
@ -1,3 +1,5 @@
|
||||
fast
|
||||
v2
|
||||
index.html
|
||||
table.html
|
||||
v.c
|
||||
v2
|
||||
|
@ -76,11 +76,11 @@ fn exec(s string) string {
|
||||
// returns milliseconds
|
||||
fn measure(cmd string) int {
|
||||
println('Warming up...')
|
||||
for i in 0..3 {
|
||||
for _ in 0..3 {
|
||||
exec(cmd)
|
||||
}
|
||||
println('Building...')
|
||||
ticks := time.ticks()
|
||||
sw := time.new_stopwatch()
|
||||
exec(cmd)
|
||||
return int(time.ticks() - ticks)
|
||||
return int(sw.elapsed().milliseconds())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user