7 template <
class ClockType=std::chrono::steady_clock>
10 void start() { start_ = ClockType::now(); }
11 void stop() { end_ = ClockType::now(); }
15 static constexpr
double nano = 1e-9;
16 return std::chrono::duration_cast<
17 std::chrono::nanoseconds>(end_-start_).count() * nano;
21 std::chrono::time_point<ClockType> start_;
22 std::chrono::time_point<ClockType> end_;