9#include <kernel/util/time_stamp.hpp>
String percent_of(const StopWatch &total_watch, const String &prefix=" [", const String &postfix="% ]") const
Returns the formatted percentage that this stop watch elapsed time relative to another total runtime ...
double elapsed() const
Returns the total elapsed time in seconds.
void start()
Starts the stop-watch.
long long elapsed_micros() const
Returns the total elapsed time in micro-seconds.
void reset()
Resets the elapsed time.
void stop()
Stops the stop-watch and increments elapsed time.
String elapsed_string(TimeFormat format=TimeFormat::s_m) const
Return the time elapsed in the stop-watch.
bool running() const
Returns true if the stop-watch is currently running.
String class implementation.
static String format_micros(long long micros, TimeFormat format=TimeFormat::s_m)
Formats an elapsed time in microseconds as a string.
TimeStamp & stamp()
Stamps the current time-stamp.
long long elapsed_micros(const TimeStamp &before) const
Calculate the time elapsed between two time stamps in microseconds.
String stringify_fp_fix(DataType_ value, int precision=0, int width=0, bool sign=false)
Prints a floating point value to a string in fixed-point notation.