termaze

maze generation and pathfinding visualizer
git clone git://git.yotsev.xyz/termaze.git
Log | Files | Refs | README | LICENSE

timer.hpp (363B)


      1 #pragma once
      2 
      3 #ifndef TIMER_HPP
      4 #define TIMER_HPP
      5 
      6 #include "state.hpp"
      7 #include <chrono>
      8 #include <thread>
      9 
     10 class timer {
     11 public:
     12     timer();
     13     ~timer();
     14     void WaitInterval(const float& time);
     15 
     16 private:
     17     std::chrono::steady_clock::time_point initTime;
     18     std::chrono::duration<float> elapsedTime = std::chrono::milliseconds(0);
     19 };
     20 
     21 #endif // TIMER_HPP