Ok. First of all, the base i was given to work with, had some mistakes, so my program was not working anyway.
But the first big problem I am facing, is more like a programming problem. I have a function which is called Get_next_event(int timeout), which is supposed to be invoked at some point, and wait to see the result. The problem is that I don't know how to make a propper timer.
Some hints that may help: I'm using C# (said it before, but repeat anyway), and I am working with threads. I read somewhere that threads have a wait() or stand() method, but I am not sure if it is the propper way to solve this case. The chain works this way:
, which sends its result to another thread, and has to wait for a response. Method1
does his job, and then tries to get and send a response for Method1.
- If the response doesn't come in (timeout) seconds (say 1000 milliseconds
executes again. If it recieves the response, the method calls get_next_event(timeout)
to set that he got the result.
If anyone knows how to implement a nice, good looking timer, it would be great! Thanks guys, and be safe
Edited by petocities, 01 June 2007 - 08:44 PM.