Currently, I create a thread, and give it an amount of time to sleep, wake up and alert the game object.
Don't think it's efficient, or I just use a timer, in win32, like the SetTimer() API, good to go if I choose a timer?
Thanks
Jack
Currently, I create a thread, and give it an amount of time to sleep, wake up and alert the game object.
Don't think it's efficient, or I just use a timer, in win32, like the SetTimer() API, good to go if I choose a timer?
Thanks
Jack
You're going to need to be more specific about what you're doing and why.
If you just want to start something after a period of time, you don't usually need a thread or a timer; just take the current time, add on the period, save that somewhere, then keep checking regularly whether the current time has reached that saved time.