If You starts slow operation in a new thread, You can anytime interrupt it. To do it after 3 mins, use Timer (SetTimer() etc.). If You starts the slow operation not in a new thread, Timer's messages will probably not be processed by application - then You can program system timer (int0) with a driver to check time.
You could use SetTimer. At the start of your program execute a SetTimer command with a time of 180*1000 (i.e. 180,000 milliseconds). 3 minutes later a TIMER event will be triggered and you trap this and kill your program.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.