vendredi 21 décembre 2018

how to run some method that will run on different thread every 2 seconds?

I want to write some code that on the main it will start some thread that will run every 2 seconds and will print something on the console.

the start function need to be something like this

     void StartTask(void* methodRoRun, long repeatTimeInSeconds);

that mean that the method receive pointer to function (methodRoRun) that will run every repeatTimeInSeconds seconds.

I can't find how to do it in C++

Aucun commentaire:

Enregistrer un commentaire