Valhalla Legends Forums Archive | C/C++ Programming | Timer Objects

AuthorMessageTime
Mephisto
Is it possible to assign a timer to an object and then have it 'go off' or something?  Going off like perhaps calling a TimerProc function?  But instead of just setting a timer you know nothing about with SetTimer(), can you do something like this (psuedo code): TimerObject idleTime = BeginTimer(...); And then also be able to interupt that timer or reset that timer with a member function of that object or something?  Obviously whatever where there is which accomplishes this won't be what I describe above, but if there's a way to accomplish what I want.

What I am trying to accomplish is idleban essentially.  Each user in the channel is assigned a channel_user_data structure which has members like username, flags, access, ping, etc. and when that structure is filled out its object is assigned to a user map.  I want a timer object to be one of those members, and have it go off in a manner that I can detect it at any time (perhaps an event?) and then be able to respond appropriately (idleban for instance).
December 27, 2004, 12:16 AM
Arta
(you can manipulate the delay on your wait function to do that)
December 27, 2004, 1:32 PM

Search