Increasing Timer?

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?

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.