I am somewhat new to C++, but i know from my java experiance that if you want to do what you are saying, you will have to have another thread that does the timer. Unfortuantely, i have no idea how to do that.