Help with time.h

I was wondering if anyone had any ideas as to how i can get my program to continuously check for time. It counts down and everything but it waits until the button is pressed (this is a GUI program) to check whether to terminate the program. So basically i want a way to check without clicking the button.
Code isn't posted because it is far too messy.
Thanks
Topic archived. No new replies allowed.