9 std::string date(
void);
30 end = std::chrono::high_resolution_clock::now();
31 std::chrono::duration<double,std::ratio<1>> d =
end-
start;
41 ss <<
" (" << d / 3600 <<
" h)";
43 ss <<
" (" << d / 60 <<
" min)";
49 std::string
millis() {
return measure<std::milli>(
" ms"); }
52 std::string
micros() {
return measure<std::micro>(
" µs"); }
56 {
end =
start = std::chrono::high_resolution_clock::now(); };
62 std::chrono::time_point<std::chrono::high_resolution_clock>
start;
65 std::chrono::time_point<std::chrono::high_resolution_clock>
end;
71 std::string
measure(
const std::string str)
74 end = std::chrono::high_resolution_clock::now();
76 std::chrono::duration<double,T> d =
end-
start;
79 ss << std::fixed << std::setprecision(
nb) << d.count() << str;
Definition: chronometer.h:18
void reset(void)
Definition: chronometer.h:55
std::string millis()
Definition: chronometer.h:49
std::string convertSeconds(double d)
Definition: chronometer.h:36
chronometer(const int _nb)
Definition: chronometer.h:24
double fp_elapsed()
Definition: chronometer.h:27
const int nb
Definition: chronometer.h:56
std::chrono::time_point< std::chrono::high_resolution_clock > end
Definition: chronometer.h:65
chronometer()
Definition: chronometer.h:21
std::string measure(const std::string str)
Definition: chronometer.h:71
std::string micros()
Definition: chronometer.h:52
std::chrono::time_point< std::chrono::high_resolution_clock > start
Definition: chronometer.h:62