sandbox
Loading...
Searching...
No Matches
timer.hpp
1#ifndef LIBSBX_UTILITY_TIMER_HPP_
2#define LIBSBX_UTILITY_TIMER_HPP_
3
4#include <chrono>
5#include <cmath>
6
7#include <libsbx/units/time.hpp>
8
9namespace sbx::utility {
10
11class timer {
12
13public:
14
15 timer();
16
17 ~timer() = default;
18
19 auto elapsed() const noexcept -> units::second;
20
21private:
22
23 std::chrono::time_point<std::chrono::high_resolution_clock> _start{};
24
25}; // class timer
26
27} // namespace sbx::utility
28
29#endif // LIBSBX_UTILITY_TIMER_HPP_
Definition: quantity.hpp:65
Definition: timer.hpp:11