11#include <OpenMS/config.h>
16#ifdef OPENMS_HAS_SYS_TIME_H
20#ifdef OPENMS_HAS_TIME_H
186 static std::string
toString(
const double time_in_seconds);
189 #ifdef OPENMS_WINDOWSPLATFORM
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
std::string toString() const
get a compact representation of the current time status.
double getUserTime() const
static std::string toString(const double time_in_seconds)
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.
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
uint64_t UInt64
Unsigned integer type (64bit)
Definition Types.h:47
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
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