11 #include <OpenMS/config.h>
16 #ifdef OPENMS_HAS_SYS_TIME_H
20 #ifdef OPENMS_HAS_TIME_H
189 #ifdef OPENMS_WINDOWSPLATFORM
190 typedef OPENMS_UINT64_TYPE
TimeType;
191 static const long long SecondsTo100Nano_;
201 PointerSizeInt start_time{ 0 };
202 PointerSizeInt start_time_usec{ 0 };
229 bool is_running_ =
false;
This class is used to determine the current process' CPU (user and/or kernel) and wall time.
Definition: StopWatch.h:40
TimeDiff_ snapShot_() const
get the absolute times for current system, user and kernel times
static const PointerSizeInt cpu_speed_
POSIX API returns CPU ticks, so we need to divide by CPU speed.
Definition: StopWatch.h:194
String toString() const
get a compact representation of the current time status.
double getUserTime() const
void resume()
Resume a stopped StopWatch.
bool operator<(const StopWatch &stop_watch) const
bool operator<=(const StopWatch &stop_watch) const
TimeDiff_ last_start_
point in time of last start()
Definition: StopWatch.h:226
void start()
Start the stop watch.
static String toString(const double time_in_seconds)
void stop()
Stop the stop watch (can be resumed later). If the stop watch was not running an exception is thrown.
double getClockTime() const
TimeDiff_ accumulated_times_
Definition: StopWatch.h:223
clock_t TimeType
Definition: StopWatch.h:193
bool operator!=(const StopWatch &stop_watch) const
void reset()
Clear the stop watch but keep running.
double getCPUTime() const
bool operator>(const StopWatch &stop_watch) const
bool operator>=(const StopWatch &stop_watch) const
bool operator==(const StopWatch &stop_watch) const
double getSystemTime() const
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
Definition: StopWatch.h:198
TimeDiff_ & operator+=(const TimeDiff_ &other)
double kernelTime() const
double ticksToSeconds_(TimeType in) const
TimeDiff_ operator-(const TimeDiff_ &earlier) const
double getCPUTime() const
bool operator==(const TimeDiff_ &rhs) const