LLVM API Documentation
#include <Timer.h>
Public Member Functions | |
Timer (StringRef N) | |
Timer (StringRef N, TimerGroup &tg) | |
Timer (const Timer &RHS) | |
const Timer & | operator= (const Timer &T) |
~Timer () | |
Timer () | |
void | init (StringRef N) |
void | init (StringRef N, TimerGroup &tg) |
const std::string & | getName () const |
bool | isInitialized () const |
void | startTimer () |
void | stopTimer () |
Friends | |
class | TimerGroup |
Timer - This class is used to track the amount of time spent between invocations of its startTimer()/stopTimer() methods. Given appropriate OS support it can also keep track of the RSS of the program at various points. By default, the Timer will print the amount of time it has captured to standard error when the last timer is destroyed, otherwise it is printed when its TimerGroup is destroyed. Timers do not print their information if they are never started.
llvm::Timer::Timer | ( | StringRef | N | ) | [inline, explicit] |
llvm::Timer::Timer | ( | StringRef | N, |
TimerGroup & | tg | ||
) | [inline] |
llvm::Timer::Timer | ( | const Timer & | RHS | ) | [inline] |
Timer::~Timer | ( | ) |
llvm::Timer::Timer | ( | ) | [inline, explicit] |
const std::string& llvm::Timer::getName | ( | ) | const [inline] |
void Timer::init | ( | StringRef | N | ) |
Definition at line 103 of file Timer.cpp.
References llvm::StringRef::begin(), llvm::StringRef::end(), and getDefaultTimerGroup().
Referenced by getNamedRegionTimer(), and Timer().
void Timer::init | ( | StringRef | N, |
TimerGroup & | tg | ||
) |
Definition at line 111 of file Timer.cpp.
References llvm::StringRef::begin(), and llvm::StringRef::end().
bool llvm::Timer::isInitialized | ( | ) | const [inline] |
Definition at line 105 of file Timer.h.
Referenced by getNamedRegionTimer().
void Timer::startTimer | ( | ) |
startTimer - Start the timer running. Time between calls to startTimer/stopTimer is counted by the Timer class. Note that these calls must be correctly paired.
Definition at line 149 of file Timer.cpp.
References ActiveTimers, and llvm::TimeRecord::getCurrentTime().
void Timer::stopTimer | ( | ) |
stopTimer - Stop the timer.
Definition at line 155 of file Timer.cpp.
References ActiveTimers, llvm::TimeRecord::getCurrentTime(), and I.
friend class TimerGroup [friend] |