Increasing Timer?

Feb 14, 2017 at 8:30pm
Hi. I've just finished my big project of building a full working text based MineSweeper. I have everything implemented but a simple 3 digit timer that increases as the game goes on, starting when the user makes their first move. Does anybody know the best way to achieve this?

Feb 14, 2017 at 9:10pm
simple way is clock() and CLOCKS_PER_SEC constant.

game starts,
start = clock();

...
timerinseconds = (clock()-start)/(double)CLOCKS_PER_SEC;

Topic archived. No new replies allowed.