#pragma once #include #include #include namespace oh_my_loam { class TicToc { public: TicToc() { tic(); } void tic() { start_ = std::chrono::system_clock::now(); } double toc() { end_ = std::chrono::system_clock::now(); std::chrono::duration elapsed_seconds = end_ - start_; return elapsed_seconds.count() * 1000; } private: std::chrono::time_point start_, end_; }; } // namespace oh_my_loam