tools/fast: fix unused var, use Stopwatch, .gitignore
parent
af334e320c
commit
5f7a8df885
|
@ -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…
Reference in New Issue