4 #ifdef HAVE_SYS_TYPES_H
8 #ifdef TIME_WITH_SYS_TIME
12 #ifdef HAVE_SYS_TIME_H
58 const std::string
duration(
void)
const;
59 const std::string
eta(
unsigned int a_percent_complete)
const;
60 const std::string
eta(
unsigned int a_complete,
unsigned int a_total)
const;
61 const std::string
bps(uint64 a_bytes)
const;
94 std::string
stamp(
const pid_t = 0,
const int a_indention = 0);
std::string stamp(const pid_t=0, const int a_indention=0)
Generate a timstamp string.
void mf_start_value(const value_type a_t)
Set the timer start value.
const duration_type duration_secs(void) const
Reutrn the duration in seconds.
const bool is_stopped(void) const
Return whether or not the timer has been stopped.
Basic types definitions and templates.
void mf_stop_value(const value_type a_t)
Set the timer stop value.
const bool is_started(void) const
Return whether or not the timer has been started.
const std::string bps(uint64 a_bytes) const
Given a number of bytes, estimate the BPS.
void clear(void)
Clear the timer.
const duration_type duration_hours(void) const
Return the duration in hours.
const duration_type mf_calculate_duration(const value_type a_start, const value_type a_stop) const
Calculate the duration between start and stop.
const timer null_timer(0, 0)
A null timer.
void assign(const timer &a_timer)
Assign timer values from another timer instance.
void start(void)
Start (or restart) the timer.
const std::string stopped_at(void) const
Generate a stopped-at string.
const value_type start_value(void) const
Return the timer start value.
const std::string mf_make_timer_string(const value_type a_t) const
Generate a string in a regular human-readable format.
const std::string started_at(void) const
Generate a started-at string.
const duration_type duration_years(void) const
Return the duration in years.
const value_type stop_value(void) const
Return the timer stop value.
const std::string current_time(void)
Return the current time.
const std::string duration(void) const
Generate a duration string.
const std::string eta(unsigned int a_percent_complete) const
Given a percent-complete for some unknown task, estimate a time to completion.
const bool use_localtime(void) const
Return whether to use localtime or GMT.
const duration_type duration_days(void) const
Return the duration in days.
const duration_type duration_mins(void) const
Return the duration in minutes.
timer & operator=(const timer &a_timer)
Assignment.
void stop(void)
Stop the timer.
const std::string mf_make_string(const value_type a_t) const
Generate a string in a timestamp format.