WPILibC++ 2024.3.2
|
A class for keeping track of how much time it takes for different parts of code to execute. More...
#include <frc/ScopedTracer.h>
Public Member Functions | |
ScopedTracer (std::string_view name, wpi::raw_ostream &os) | |
Constructs a ScopedTracer instance. More... | |
~ScopedTracer () | |
ScopedTracer (const ScopedTracer &)=delete | |
ScopedTracer & | operator= (const ScopedTracer &)=delete |
A class for keeping track of how much time it takes for different parts of code to execute.
This class uses RAII, meaning you simply need to create an instance at the top of the block you are timing. After the block finishes execution (i.e. when the ScopedTracer instance gets destroyed), the epoch is printed to the provided raw_ostream.
frc::ScopedTracer::ScopedTracer | ( | std::string_view | name, |
wpi::raw_ostream & | os | ||
) |
Constructs a ScopedTracer instance.
name | The name of the epoch. |
os | A reference to the raw_ostream to print data to. |
frc::ScopedTracer::~ScopedTracer | ( | ) |
|
delete |
|
delete |