Developer documentation
Version 3.0.3-105-gd3941f44
MR::IntervalTimer Class Reference

#include "timer.h"

Inheritance diagram for MR::IntervalTimer:
MR::Timer

Public Member Functions

 IntervalTimer (double time_interval=0.0333333)
 by default, fire at ~30 Hz - most monitors are 60Hz More...
 
 operator bool ()
 return true if ready, false otherwise More...
 

Protected Attributes

const std::chrono::high_resolution_clock::duration interval
 
std::chrono::high_resolution_clock::time_point next_time
 
- Protected Attributes inherited from MR::Timer
std::chrono::high_resolution_clock::time_point from
 

Additional Inherited Members

- Protected Member Functions inherited from MR::Timer
 Timer ()
 
void start ()
 
double elapsed ()
 
- Static Protected Member Functions inherited from MR::Timer
static double current_time ()
 

Detailed Description

Definition at line 52 of file timer.h.

Constructor & Destructor Documentation

◆ IntervalTimer()

MR::IntervalTimer::IntervalTimer ( double  time_interval = 0.0333333)
inline

by default, fire at ~30 Hz - most monitors are 60Hz

Definition at line 55 of file timer.h.

Member Function Documentation

◆ operator bool()

MR::IntervalTimer::operator bool ( )
inline

return true if ready, false otherwise

Note that the timer immediately resets; next invocation will return false until another interval has elapsed.

Definition at line 62 of file timer.h.

Member Data Documentation

◆ interval

const std::chrono::high_resolution_clock::duration MR::IntervalTimer::interval
protected

Definition at line 72 of file timer.h.

◆ next_time

std::chrono::high_resolution_clock::time_point MR::IntervalTimer::next_time
protected

Definition at line 73 of file timer.h.


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