MaterialX 1.38.7
No Matches
ScopedTimer Class Reference

A class for scoped event timing. More...

#include <Timer.h>

Public Types

using clock = std::chrono::high_resolution_clock

Public Member Functions

 ScopedTimer (double *externalCounter=nullptr)
double elapsedTime ()
 Return the elapsed time in seconds since our start time.
void startTimer ()
 Activate the timer, and set our start time to the current moment.
void endTimer ()
 Deactivate the timer, and add the elapsed time to our external counter.

Protected Attributes

bool _active
double * _externalCounter
std::chrono::time_point< clock > _startTime

Detailed Description

A class for scoped event timing.

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