From ec5ff83334f378e5bcc443b64bf3df6892b94eac Mon Sep 17 00:00:00 2001 From: John Hodge Date: Mon, 8 Aug 2016 14:40:12 +0800 Subject: Main - Restrict precion of printed elapsed time --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 70c2485b..24690779 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,6 +6,7 @@ * - Compiler Entrypoint */ #include +#include #include #include "parse/lex.hpp" #include "parse/parseerror.hpp" @@ -66,7 +67,7 @@ Rv CompilePhase(const char *name, Fcn f) { auto rv = f(); auto end = clock(); g_cur_phase = ""; - ::std::cout << name << ": DONE (" << static_cast(end - start) / static_cast(CLOCKS_PER_SEC) << " s)" << ::std::endl; + ::std::cout << name << ": DONE (" << ::std::fixed << ::std::setprecision(2) << static_cast(end - start) / static_cast(CLOCKS_PER_SEC) << " s)" << ::std::endl; return rv; } template -- cgit v1.2.3