Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


How do I use timeSetEvent()?

This topic is 5716 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve read the MSDN, and I don''t really understand what it''s getting at. I understand that the timer runs in a different thread, and depending on what you call it with it will do different things, but I don''t know what SetEvent and PulseEvent do, or what sort of function it would need to point to if it had the TIME_CALLBACK_FUNCTION set. Could I just make it point to a void someFunc(void) and have that function set a variable for me?

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
timeSetTimer when you set it in event mode will release (or pulse) a HEVENT event, that you create with CreateEvent(). If you don''t know how Events work, then you probably should read up on the threading section of MSDN; they implement your basic "gate" thread synchronization primitive.

As for the callback function, the type of the function you''re supposed to declare is a TimeProc. The prototype for TimeProc is, according to MSDN:

void CALLBACK MyTimeProc(
UINT uMsg,
DWORD dwUser,
DWORD dw1,

If you have any more Windows API questions, msdn.microsoft.com really is your friend. It has all the answers.

Share this post

Link to post
Share on other sites
I always try to figure it out before coming here to ask I have a copy of the VC++ 6.0 msdn files on my computer, so I don't have to go to their website, which in my opinion is quite unfriendly compared to my trusty help files. Anyway, thanks, you have lead me to enlightenment and I understand what I am to do.

edit: I find the msdn hard to understand when it is explaining something, as they tend to speak in a cryptic way. The only things I can somewhat accuratly decipher are the function definitions, and as you can see, i'm not even that great at that.

[edited by - blaste on April 19, 2003 2:10:59 AM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!