Skip to content

Perceval62/timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published