Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Query Class Reference

Perform CPU duration measurement between two time points. More...

#include <Query.hpp>

Public Member Functions

 Query ()
 
void begin ()
 
void end ()
 
uint64_t value ()
 

Private Attributes

std::chrono::time_point< std::chrono::high_resolution_clock > _start
 Timing start point.
 
std::chrono::time_point< std::chrono::high_resolution_clock > _end
 Timing end point.
 
bool _running = false
 Is a measurement currently taking place.
 

Detailed Description

Perform CPU duration measurement between two time points.

Constructor & Destructor Documentation

◆ Query()

Query::Query ( )

Constructor.

Member Function Documentation

◆ begin()

void Query::begin ( )

Start measuring the timing.

◆ end()

void Query::end ( )

End the measurement.

◆ value()

uint64_t Query::value ( )

Query the last timing measured. Unit used is nanoseconds.

Returns
the raw metric value

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