1234567891011121314151617181920212223242526 |
- #ifndef TIMER_H
- #define TIMER_H
- #include <chrono>
- #include <thread>
- namespace iv {
- class Timer{
- public:
- Timer(const float& hz);
- void Start();
- void Stop();
- private:
- std::chrono::duration<float> duration_;
- std::chrono::system_clock::time_point start_;
- std::chrono::duration<float> elapsed_;
- };
- }
- #endif // TIMER_H
|