3#include <boost/optional.hpp>
15 typedef decltype(std::chrono::duration_cast<std::chrono::seconds>(std::chrono::seconds::zero()).count())
SecondType;
16 typedef decltype(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::milliseconds::zero()).count())
MilisecondType;
17 typedef decltype(std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::nanoseconds::zero()).count())
NanosecondType;
105 uint64_t lastDisplayedCount;
107 std::chrono::high_resolution_clock::time_point timeOfStart;
108 std::chrono::high_resolution_clock::time_point timeOfLastMessage;
A class that provides convenience operations to display run times.
decltype(std::chrono::duration_cast< std::chrono::seconds >(std::chrono::seconds::zero()).count()) SecondType
bool isMaxCountSet() const
Returns whether a maximal count (which is required to achieve 100% progress) has been specified.
std::string const & getItemName() const
Returns the current name of what we are counting (e.g.
decltype(std::chrono::duration_cast< std::chrono::nanoseconds >(std::chrono::nanoseconds::zero()).count()) NanosecondType
bool updateProgress(uint64_t count)
Updates the progress to the current count and prints it if the delay passed.
uint64_t getShowProgressDelay() const
Returns the currently specified minimal delay (in seconds) between two progress messages.
void setMaxCount(uint64_t maxCount)
Sets the maximal possible count.
void startNewMeasurement(uint64_t startCount)
Starts a new measurement, dropping all progress information collected so far.
decltype(std::chrono::duration_cast< std::chrono::milliseconds >(std::chrono::milliseconds::zero()).count()) MilisecondType
void setItemName(std::string const &name)
Customizes the name of what we are counting (e.g.
uint64_t getMaxCount() const
Returns the maximal possible count (if specified).
void unsetMaxCount()
Erases a previously specified maximal count.
void setShowProgressDelay(uint64_t delay)
Customizes the minimal delay between two progress messages.