CodePudding user response:
Vc MFC with timerCodePudding user response:
At the start of the game time_t start=time (NULL);In the process of each game:
If (time (NULL) - start & gt;=60) {
Game_over ();
}
CodePudding user response:
Under Linux has alarm, win32 should also have the APICodePudding user response:
Consider using multithreading, a thread for timing, one for the score,
CodePudding user response:
Consider using multithreading, a thread for timing, as a thread 1, another thread for processing points, as the thread 2,CodePudding user response:
SetTimer at that time