crawlserv++
[under development]
Application for crawling and analyzing textual content of websites.
|
A simple timer with high resolution. More...
#include <SimpleHR.hpp>
Construction | |
SimpleHR () | |
Constructor starting the timer. More... | |
Tick control | |
std::uint64_t | tick () |
Timer tick returning the number of microseconds passed. More... | |
std::string | tickStr () |
Timer tick returning the number of microseconds passed as string. More... | |
Reset | |
void | clear () |
Resets the internal state of the timer. More... | |
Internal state | |
std::chrono::high_resolution_clock::time_point | timePoint |
(Time) point of creation or last tick. More... | |
A simple timer with high resolution.
Starting from its creation, this timer counts the number of microseconds until tick() or tickStr() is called.
The timer is restarted after each tick.
|
inline |
Constructor starting the timer.
|
inline |
Resets the internal state of the timer.
References timePoint.
|
inline |
Timer tick returning the number of microseconds passed.
Restarts the timer.
References crawlservpp::Helper::DateTime::now(), and timePoint.
|
inline |
Timer tick returning the number of microseconds passed as string.
Restarts the timer.
References crawlservpp::Helper::DateTime::microsecondsToString(), crawlservpp::Helper::DateTime::now(), and timePoint.
Referenced by crawlservpp::Main::Server::tick().
|
protected |