17 std::chrono::steady_clock::time_point t0, tx;
23 t0 = std::chrono::steady_clock::now();
26 operator bool()
const {
return delta.count() != 0 ? true :
false; }
28 void start() { tx = std::chrono::steady_clock::now(); }
32 delta += std::chrono::duration_cast<Tunit>(std::chrono::steady_clock::now() - tx);
37 auto now = std::chrono::steady_clock::now();
38 auto total = std::chrono::duration_cast<Tunit>(now - t0);
39 return delta.count() / double(total.count());
60 using clock = std::chrono::high_resolution_clock;
61 std::chrono::time_point<clock> starting_time, ending_time;
66 inline void start() { starting_time = clock::now(); }
68 inline void stop() { ending_time = clock::now(); }
Timer for measuring relative time consumption.
Definition: timers.h:13
Simple struct to measure duration of code.
Definition: timers.h:58
Cell list class templates.
Definition: actions.cpp:11