Skip to content

cageq/ktimer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KTimer

simple useable heap timer .

Samples

#include "ktimer.h"

ktimer::KTimer<std::chrono::seconds, std::mutex>  myTimer ; //default ktimer::KTimer<> myTimer ; 


myTimer.start_timer(3, []() {
		std::cout << "handle timeout 333 " << std::time(0) << std::endl; 

		return true; //don't forget to return,   false will stop the timer 
		
}); 

myTimer.start() ; //start the loop