diff options
author | John Hodge <tpg@mutabah.net> | 2016-08-08 14:40:12 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-08-08 14:40:12 +0800 |
commit | ec5ff83334f378e5bcc443b64bf3df6892b94eac (patch) | |
tree | 347f3518efa6328490b1b22f838425df2dd4ba85 /src | |
parent | 6a6fed23f8293712a0e504de07d39c8baf6150a0 (diff) | |
download | mrust-ec5ff83334f378e5bcc443b64bf3df6892b94eac.tar.gz |
Main - Restrict precion of printed elapsed time
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 <iostream>
+#include <iomanip>
#include <string>
#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<double>(end - start) / static_cast<double>(CLOCKS_PER_SEC) << " s)" << ::std::endl;
+ ::std::cout << name << ": DONE (" << ::std::fixed << ::std::setprecision(2) << static_cast<double>(end - start) / static_cast<double>(CLOCKS_PER_SEC) << " s)" << ::std::endl;
return rv;
}
template <typename Fcn>
|