Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::svg::Trace Class Reference

Implements a simple RAII execution time tracer. More...

Public Member Functions

 Trace (const char *name)
 Start a new trace with the given name.
 
 Trace (const Trace &)=delete
 
 Trace (Trace &&)=delete
 
Traceoperator= (const Trace &)=delete
 
Traceoperator= (Trace &&)=delete
 
 ~Trace ()
 Stop the trace.
 
void stop ()
 Explicitly stop the trace, to stop before this object is destructed.
 

Detailed Description

Implements a simple RAII execution time tracer.

Usage:

{
Trace trace("My trace");
...
}
Implements a simple RAII execution time tracer.
Definition renderer_tool.cc:44

This will print the execution time of the code within the block.

Member Function Documentation

◆ stop()

void donner::svg::Trace::stop ( )
inline

Explicitly stop the trace, to stop before this object is destructed.

Once stopped, the trace cannot be restarted.

Example:

{
Trace trace("My trace");
...
trace.stop();
...
}

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