|
VLink
2.0.0
A high-performance communication middleware
|
Scope guard that opens and closes a CpuProfiler active interval.
More...
#include <cpu_profiler_guard.h>
Public Member Functions | |
| CpuProfilerGuard (class CpuProfiler *profiler) noexcept | |
Constructs the guard and opens the active interval on profiler. More... | |
| ~CpuProfilerGuard () noexcept | |
| Destructor; closes the active interval on the bound profiler. More... | |
Scope guard that opens and closes a CpuProfiler active interval.
Calls CpuProfiler::begin in its constructor and CpuProfiler::end in its destructor. A null profiler pointer is accepted; both ends become no-ops in that case.
|
explicitnoexcept |
Constructs the guard and opens the active interval on profiler.
| profiler | Target profiler; nullptr disables both ends. |
|
noexcept |
Destructor; closes the active interval on the bound profiler.