LLVM API Documentation
#include <Timer.h>
Public Member Functions | |
TimeRecord () | |
double | getProcessTime () const |
double | getUserTime () const |
double | getSystemTime () const |
double | getWallTime () const |
ssize_t | getMemUsed () const |
bool | operator< (const TimeRecord &T) const |
void | operator+= (const TimeRecord &RHS) |
void | operator-= (const TimeRecord &RHS) |
void | print (const TimeRecord &Total, raw_ostream &OS) const |
Static Public Member Functions | |
static TimeRecord | getCurrentTime (bool Start=true) |
llvm::TimeRecord::TimeRecord | ( | ) | [inline] |
TimeRecord TimeRecord::getCurrentTime | ( | bool | Start = true | ) | [static] |
getCurrentTime - Get the current time and memory usage. If Start is true we get the memory usage before the time, otherwise we get time before memory usage. This matters if the time to get the memory usage is significant and shouldn't be counted as part of a duration.
Definition at line 129 of file Timer.cpp.
References getMemUsage(), llvm::sys::Process::GetTimeUsage(), llvm::sys::TimeValue::microseconds(), and llvm::sys::TimeValue::seconds().
Referenced by llvm::Timer::startTimer(), and llvm::Timer::stopTimer().
ssize_t llvm::TimeRecord::getMemUsed | ( | ) | const [inline] |
double llvm::TimeRecord::getProcessTime | ( | ) | const [inline] |
double llvm::TimeRecord::getSystemTime | ( | ) | const [inline] |
double llvm::TimeRecord::getUserTime | ( | ) | const [inline] |
double llvm::TimeRecord::getWallTime | ( | ) | const [inline] |
void llvm::TimeRecord::operator+= | ( | const TimeRecord & | RHS | ) | [inline] |
void llvm::TimeRecord::operator-= | ( | const TimeRecord & | RHS | ) | [inline] |
bool llvm::TimeRecord::operator< | ( | const TimeRecord & | T | ) | const [inline] |
void TimeRecord::print | ( | const TimeRecord & | Total, |
raw_ostream & | OS | ||
) | const |
print - Print the current timer to standard error, and reset the "Started" flag.
Definition at line 175 of file Timer.cpp.
References llvm::format(), getMemUsed(), getProcessTime(), getSystemTime(), getUserTime(), getWallTime(), and printVal().