Signal the timer queue condition before releasing the mutex, as it should be used.
Check the running flag before waiting for the condition in timer_loop. This avoids "The Lost Wake-Up Problem" when the program terminates before the timer thread is waiting.

Possible fix to issue #17 - Dynamips hangs on startup if no (or unknown) parameters are given v0.2.8 and 0.2.9