Sign in to follow this  
lucky6969b

Simulating the event of arrival.

Recommended Posts

lucky6969b    1330

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

Edited by lucky6969b

Share this post


Link to post
Share on other sites
Kylotan    10008

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this