Trouble with threads in a function to exec another function after X time
问题 I am trying to create this function in order to exec another function after X time: void execAfter(double time, void *(*func)(void *), t_params *params); I have made an Thread encapsulation and a Time encapsulation (objects Thread and Time). What I want to do in pseudo code: Call execAfter instantiate Thread call thread->create(*funcToExec, *params, timeToWait) [inside thread, leaving execAfter] instanciate Time object wait for X time exec funcToExec delete Time object [leaving thread, back