⏱️ golxzn::os::chrono ⏱️ 1.2.4
Chrono for golxzn's projects.
Loading...
Searching...
No Matches
timer.hpp File Reference

Timer classes to measure time intervals. More...

#include <thread>
#include "golxzn/os/chrono/time.hpp"
#include "golxzn/os/chrono/impl/timer.inl"

Go to the source code of this file.

Classes

class  golxzn::os::chrono::timer< OnTimerDone, BaseClock >
 Class that represents timer. More...
 
class  golxzn::os::chrono::fast_timer< BaseClock >
 Class that represents fast_timer. More...
 

Variables

static constexpr std::chrono::microseconds golxzn::os::chrono::constants::default_precision { i64{ 1 } }
 Default precision of timer.

‍Only if GOLXZN_MULTITHREADING is defined.

This value is used as time to wait inside timer thread.

 

Detailed Description

Timer classes to measure time intervals.

Author
Ruslan Golovinskii (golxz.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
Date
2023-10-24

Variable Documentation

◆ default_precision

constexpr std::chrono::microseconds golxzn::os::chrono::constants::default_precision { i64{ 1 } }
staticconstexpr

Default precision of timer.

‍Only if GOLXZN_MULTITHREADING is defined.

This value is used as time to wait inside timer thread.

while(is_running()) {
std::this_thread::sleep_for(default_precision);
}