feat(util/timeit): avoid scientific notation when displaying runtimes
This commit is contained in:
parent
d28eb919f1
commit
e3062c64e2
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ Author: Leonardo de Moura
|
|||
#include <time.h>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
namespace lean {
|
||||
/**
|
||||
|
@ -23,7 +24,7 @@ public:
|
|||
}
|
||||
~timeit() {
|
||||
clock_t end = clock();
|
||||
m_out << m_msg << " " << ((static_cast<double>(end) - static_cast<double>(m_start)) / CLOCKS_PER_SEC) << " secs\n";
|
||||
m_out << m_msg << " " << std::fixed << std::setprecision(5) << ((static_cast<double>(end) - static_cast<double>(m_start)) / CLOCKS_PER_SEC) << " secs\n";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue