From a3bc32f3e00c42ff676c495efab56e468b3cf889 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 5 May 2020 15:31:23 +0300 Subject: [PATCH] builder: use time.new_stopwatch instead of benchmark.new_benchmark (reduces exe size) --- vlib/v/builder/compile.v | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vlib/v/builder/compile.v b/vlib/v/builder/compile.v index de366cb2dd..df7f85a599 100644 --- a/vlib/v/builder/compile.v +++ b/vlib/v/builder/compile.v @@ -3,7 +3,7 @@ // that can be found in the LICENSE file. module builder -import benchmark +import time import os import v.pref import v.util @@ -31,15 +31,14 @@ pub fn compile(command string, pref &pref.Preferences) { println('builder.compile() pref:') // println(pref) } - mut tmark := benchmark.new_benchmark() + mut sw := time.new_stopwatch() match pref.backend { .c { b.compile_c() } .js { b.compile_js() } .x64 { b.compile_x64() } } if pref.is_stats { - tmark.stop() - println('compilation took: ' + tmark.total_duration().str() + 'ms') + println('compilation took: ${sw.elapsed().milliseconds()} ms') } if pref.is_test || pref.is_run { b.run_compiled_executable_and_exit()