|
crawlserv++
[under development]
Application for crawling and analyzing textual content of websites.
|
A simple timer. More...
#include <Simple.hpp>
Construction | |
| Simple () | |
| Constructor starting the timer. More... | |
Tick control | |
| std::uint64_t | tick () |
| Timer tick returning the number of milliseconds passed. More... | |
| std::string | tickStr () |
| Timer tick returning the number of milliseconds passed as string. More... | |
Reset | |
| void | clear () |
| Resets the internal state of the timer. More... | |
Internal state | |
| std::chrono::steady_clock::time_point | timePoint |
| (Time) point of creation or last tick. More... | |
A simple timer.
Starting from its creation, this timer counts the number of milliseconds 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.
Referenced by crawlservpp::Module::Analyzer::Algo::TopicModelling::resetAlgo().
|
inline |
Timer tick returning the number of milliseconds passed.
Restarts the timer.
References crawlservpp::Helper::DateTime::now(), and timePoint.
Referenced by crawlservpp::Main::Database::checkConnection(), crawlservpp::Network::TorControl::newIdentity(), crawlservpp::Module::Analyzer::Algo::TopicModelling::onAlgoInit(), crawlservpp::Module::Crawler::Thread::onReset(), crawlservpp::Module::Analyzer::Algo::TopicModelling::resetAlgo(), crawlservpp::Network::TorControl::setNewIdentityMax(), crawlservpp::Network::TorControl::setNewIdentityMin(), and crawlservpp::Network::TorControl::tick().
|
inline |
Timer tick returning the number of milliseconds passed as string.
Restarts the timer.
References crawlservpp::Helper::DateTime::millisecondsToString(), crawlservpp::Helper::DateTime::now(), and timePoint.
Referenced by crawlservpp::Module::Analyzer::Database::checkSources(), crawlservpp::Module::Analyzer::Thread::cleanUpQueries(), crawlservpp::Module::Analyzer::Database::getCorpus(), crawlservpp::Main::Database::moveWebsite(), crawlservpp::Module::Parser::Thread::onReset(), crawlservpp::Module::Extractor::Thread::onReset(), crawlservpp::Module::Parser::Thread::onTick(), crawlservpp::Module::Extractor::Thread::onTick(), crawlservpp::Module::Analyzer::Algo::AllTokens::resetAlgo(), crawlservpp::Module::Analyzer::Algo::TopicModelling::resetAlgo(), and crawlservpp::Main::Server::tick().
|
protected |