31 #ifndef TIMER_SIMPLEHR_HPP_ 32 #define TIMER_SIMPLEHR_HPP_ 34 #include "../Helper/DateTime.hpp" 79 std::chrono::high_resolution_clock::time_point
timePoint;
99 std::chrono::duration_cast<std::chrono::microseconds>(
120 std::chrono::duration_cast<std::chrono::microseconds>(
132 this->
timePoint = std::chrono::high_resolution_clock::time_point{};
std::string tickStr()
Timer tick returning the number of microseconds passed as string.
Definition: SimpleHR.hpp:118
std::string microsecondsToString(std::uint64_t microseconds)
Converts microseconds into a well-formatted string.
Definition: DateTime.hpp:859
std::string now()
Formats the current date/time as string in the format YYYY-MM-DD HH:MM:SS.
Definition: DateTime.hpp:1045
A simple timer with high resolution.
Definition: SimpleHR.hpp:52
Namespace for timers.
Definition: Simple.hpp:40
SimpleHR()
Constructor starting the timer.
Definition: SimpleHR.hpp:89
std::chrono::high_resolution_clock::time_point timePoint
(Time) point of creation or last tick.
Definition: SimpleHR.hpp:79
std::uint64_t tick()
Timer tick returning the number of microseconds passed.
Definition: SimpleHR.hpp:97
void clear()
Resets the internal state of the timer.
Definition: SimpleHR.hpp:131