LLVM: llvm::Timer Class Reference (original) (raw)

This class is used to track the amount of time spent between invocations of its startTimer()/stopTimer() methods. More...

#include "[llvm/Support/Timer.h](Timer%5F8h%5Fsource.html)"

Public Member Functions
Timer (StringRef TimerName, StringRef TimerDescription)
Timer (StringRef TimerName, StringRef TimerDescription, TimerGroup &tg)
Timer (const Timer &RHS)
const Timer & operator= (const Timer &T)
~Timer ()
Timer ()=default
Create an uninitialized timer, client must use 'init'.
void init (StringRef TimerName, StringRef TimerDescription)
void init (StringRef TimerName, StringRef TimerDescription, TimerGroup &tg)
const std::string & getName () const
const std::string & getDescription () const
bool isInitialized () const
bool isRunning () const
Check if the timer is currently running.
bool hasTriggered () const
Check if startTimer() has ever been called on this timer.
void startTimer ()
Start the timer running.
void stopTimer ()
Stop the timer.
void clear ()
Clear the timer state.
void yieldTo (Timer &)
Stop the timer and start another timer.
TimeRecord getTotalTime () const
Return the duration for which this timer has been running.

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.

Definition at line 81 of file Timer.h.

Timer() [1/4]

Timer() [2/4]

Timer() [3/4]

Timer() [4/4]

llvm::Timer::Timer ( ) explicitdefault

Create an uninitialized timer, client must use 'init'.

clear()

getDescription()

const std::string & llvm::Timer::getDescription ( ) const inline

getName()

const std::string & llvm::Timer::getName ( ) const inline

getTotalTime()

TimeRecord llvm::Timer::getTotalTime ( ) const inline

Return the duration for which this timer has been running.

Definition at line 138 of file Timer.h.

hasTriggered()

bool llvm::Timer::hasTriggered ( ) const inline

init() [1/2]

init() [2/2]

isInitialized()

bool llvm::Timer::isInitialized ( ) const inline

isRunning()

bool llvm::Timer::isRunning ( ) const inline

operator=()

startTimer()

void Timer::startTimer ( )

stopTimer()

void Timer::stopTimer ( )

yieldTo()

void Timer::yieldTo ( Timer & O )

TimerGroup


The documentation for this class was generated from the following files: