$darkmode
timer.hpp File Reference
#include <chrono>
#include <functional>
Include dependency graph for timer.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  timer::ScopeTimer
 
class  timer::DurationTimer< P >
 

Typedefs

using timer::Milliseconds = std::chrono::duration< double, std::milli >
 
using timer::TimePoint = std::chrono::high_resolution_clock::time_point
 

Detailed Description

This file defines types useful for measuring times and doing something with the measurement.

Example:

void some_func() {
ScopeTimer t([]() {
// Do something with the time.
});
// Do whatever...
}