I just want to ask if i can run a timer at the same time with my program? It is like a quiz bee, i'm asking questions and there is a specific time to finish answering. Thank you!

Recommended Answers

All 2 Replies

You can set a timer to generate an interrupt. It will happily run until it expires. In your code for the quiz, if the quiz finishes without the timer triggering the interrupt, then you can cancel it. What OS are you programming this on? Some timer types are not supported by the MS compilers that are on Linux. If you need more help, just holler. If this is a class exercise, please try to solve it first (you at least now have a hint), and then we will help you sort it out.

Uhmm.. I've made a timer out of a loop only, and i'm using windows 7 as my OS. i'm just trying to make a quiz like program for me to review my lessons in turbo c. Thank you!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.