11 replies
by sibasis75
Its been a long time I worked on c++ and unix but you can try this site .. I use dto get my resources here : do a "ctrl+f" and search for clock or something ... u should definitely get it
by amd_ghouse
by //.ichael g
What platform?
Win32 has some SetTimer functions that can either do a callback or send a WM_TIMER message to the client.
by amd_ghouse
by cedric king
The simplest I guess would be to perform a Do While Loop while waiting for the user input. The condition would be either the user enters something which breaks from the Loop or when the time is up. For the time portion, just have a variable prior entering the Loop storing THAT time then in the Loop get the current time. If Current Time greater than the Started Time by the specified amount of time, then exit Loop too.
Hope you understand what I meant. It's basically a Loop function where two conditions are to be met for it to continue.
by amd_ghouse
by lastorck
i think so (Win32):
CreateProcess(...,&procInfo);
WaitForSingleObject(procInfo.hProcess, timeout);
TerminateProcess(procInfo.hProcess, 0);
Regards
by amd_ghouse
by lastorck
maybe so (inside process):
//...
HANDLE p = GetCurrentProcess();
GetProcessTimes(p, ...);
//...
tm = localtime(&t);
//....
if(...)
ExitProcess(0);
Regards
by amd_ghouse
by amd_ghouse
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending