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) |
| LLVM_ABI | ~Timer () |
| Timer ()=default | |
| Create an uninitialized timer, client must use 'init'. | |
| LLVM_ABI void | init (StringRef TimerName, StringRef TimerDescription) |
| LLVM_ABI 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. | |
| LLVM_ABI void | startTimer () |
| Start the timer running. | |
| LLVM_ABI void | stopTimer () |
| Stop the timer. | |
| LLVM_ABI void | clear () |
| Clear the timer state. | |
| LLVM_ABI 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 87 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'.
References LLVM_ABI, and TimerGroup.
◆ clear()
Clear the timer state.
Definition at line 169 of file Timer.cpp.
◆ 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 |
|---|
◆ hasTriggered()
| bool llvm::Timer::hasTriggered ( ) const | inline |
|---|
Check if startTimer() has ever been called on this timer.
Definition at line 128 of file Timer.h.
◆ init() [1/2]
◆ init() [2/2]
◆ isInitialized()
| bool llvm::Timer::isInitialized ( ) const | inline |
|---|
◆ isRunning()
| bool llvm::Timer::isRunning ( ) const | inline |
|---|
Check if the timer is currently running.
Definition at line 125 of file Timer.h.
◆ 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: