I am currently working on a quiz game and I want to be able to start a timer when the game begins and then end the timer when the game ends. Then I want to print out how long it took the player to complete the game. Is there any simple way of doing this?
EDIT: Thank you xenteros! All I had to do was remove "long" from "long difference = stopTime - startTime;" , create a variable before that line of code like this "long difference;", and initialize the "startTime" variable.