Take the initial time with time() , use inside a loop take the time again, then use difftime() to check the diffrence between the two; if it's greater than the max time, break the loop.
Reputation Points: 888
Solved Threads: 114
Nearly a Posting Virtuoso
Offline 1,270 posts
since Nov 2008