Implementing a Pause function in a computer game can be surprisingly complicated. It took me over an hour - basically just to make everything stop.The hardest part - without any surprise - was sound and music. Other than that, I had to make sure I was using game time everywhere, instead of real time. Then I can stop the game timer and everything freezes.
Using a separate timer for game events also means I could (in theory) make the game work in slow motion etc. but I haven't tried that yet.