Skip to content

Latest commit

 

History

History
31 lines (27 loc) · 586 Bytes

File metadata and controls

31 lines (27 loc) · 586 Bytes

Timer

Basic timers for cpp with a callback. Header only. Executes the callback routine after each interval.

Prerequisites:

C++17 ready compiler.

Basic example:

#include "timer.hpp"

void myCoolFunc(void*){printf("Callback !\n");}

/** snip **/
unsigned int interval = 1000; //interval in millisecond
timer myTimer("myCoolTimer", interval, myCoolFunc, NULL);
myTimer.start();
/** snip **/

myTimer.stop();

Build instructions

git clone https://github.com/Perceval62/timer.git
cd timer
mkdir build && cd build
cmake ..
make

Vincent Perrier 21-10-2021