i tried to make program that
do {
open a .exe (and i did it)
then count 30 mints or so .. i know time in counter in ms
and after this 30 mints the count stop and the .exe closed ...
}
what i need .. i need some hints or code about the time counter .. i know there's alot of types but i tried to search i couldn't find one close the .exe application after the count finish .
thanks.
to be honest .. i didn't write a full code yet .. till now i am trying to get some information about how to make count the time then close the app directly .. then i will make it into loop
and i think there's no need to my code to know how to make the time count then close the exe which the code opened it
thanks for reply :)
If what you are trying to do is:
Open a file, then put a "timer" on that will "halt" the program for 30 minutes (no idea why you would want to do that) then close your C++ program,the only way I would know to do it is use the Sleep()function
Sleep(1.8e+6); //Would put your program to sleep for 30 minutes...but why my friend?
open game.exe
(timer wait ) >>30 minutes
if ( timer <30 minutes)
{
do nothing
}
else
{
reset timer
close game.exe
}
_____________________________________________________
Timer wait .. i believe that there's a function could make me wait 30 minutes before taking action
and i made if else loop that waiting for the timer to take the action .. if the time < 30 no action
else will reset my timer to 0 ( i don't need it .. but will be good to know ) then the action close.exe .
i want to know how to set the timer ... and how to close the game.exe ..
thanks .