37 #include <OpenMS/config.h>
42 #ifdef OPENMS_HAS_SYS_TIME_H
46 #ifdef OPENMS_HAS_TIME_H
215 #ifdef OPENMS_WINDOWSPLATFORM
216 typedef OPENMS_UINT64_TYPE
TimeType;
217 static const long long SecondsTo100Nano_;
227 PointerSizeInt start_time{ 0 };
228 PointerSizeInt start_time_usec{ 0 };
255 bool is_running_ =
false;
This class is used to determine the current process' CPU (user and/or kernel) and wall time.
Definition: StopWatch.h:66
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:220
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:252
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:249
clock_t TimeType
Definition: StopWatch.h:219
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:61
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Definition: StopWatch.h:224
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