[#llvm-TimeRegion] = xref:llvm.adoc[llvm]::TimeRegion :relfileprefix: ../ :mrdocs: RAII helper that starts a timer on construction and stops it on destruction. == Synopsis Declared in `<llvm/Support/Timer.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class TimeRegion; ---- == Description The TimeRegion class is used as a helper class to call the startTimer() and stopTimer() methods of the Timer class. When the object is constructed, it starts the timer specified as its argument. When it is destroyed, it stops the relevant timer. This makes it easy to time a region of code. == Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/TimeRegion/2constructor-03.adoc[`TimeRegion`] [.small]#[constructor]# | Constructors | xref:llvm/TimeRegion/2destructor.adoc[`~TimeRegion`] [.small]#[destructor]# | Stop the associated timer if one was started. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:llvm/NamedRegionTimer.adoc[`NamedRegionTimer`] | Combines Timer and TimeRegion to time a named region in one statement. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#