ankursaxena
Programmer
Hi! I want to know how exactly would you implement a timer in C++, which lets the current thread run and send a signal after a time out to the original thread so that the thread can do some work. just like an event i guess.
may be like
#define init 1
#define time_out 2
signal = init;
start_timer(sec); //this sets the signal to time_out
while(signal != time_out)
{
..
do other stuff that u might want to
}
do the stuff u wanted to do when the timer expired.
thanx a lot in advance..
actually better still if there are some good tutorials on this topic, it would be great.
thanx.
may be like
#define init 1
#define time_out 2
signal = init;
start_timer(sec); //this sets the signal to time_out
while(signal != time_out)
{
..
do other stuff that u might want to
}
do the stuff u wanted to do when the timer expired.
thanx a lot in advance..
actually better still if there are some good tutorials on this topic, it would be great.
thanx.