MRSL JPS3D Library  1.1
An implementaion of Jump Point Search on 3D voxel map
timer.hpp
1 #include <chrono>
2 
3 namespace JPS {
4  class Timer {
5  typedef std::chrono::high_resolution_clock high_resolution_clock;
6  typedef std::chrono::milliseconds milliseconds;
7  public:
8  explicit Timer(bool run = false)
9  {
10  if (run)
11  Reset();
12  }
13  void Reset()
14  {
15  _start = high_resolution_clock::now();
16  }
17  milliseconds Elapsed() const
18  {
19  return std::chrono::duration_cast<milliseconds>(high_resolution_clock::now() - _start);
20  }
21  private:
22  high_resolution_clock::time_point _start;
23  };
24 }
Definition: map_util.h:11
Definition: timer.hpp:4