aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/helpers/Timer.hpp
blob: 827e762569c2f28621a38e94ef3d190a9065ae78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include <chrono>

class CTimer {
  public:
    void                                         reset();
    float                                        getSeconds();
    long                                         getMillis();
    const std::chrono::steady_clock::time_point& chrono() const;

  private:
    std::chrono::steady_clock::time_point m_tpLastReset;

    std::chrono::steady_clock::duration   getDuration();
};