How to develop pause system for client-based game?

I’m working on a short game and since most of the game is handled by the client (I don’t care about exploiters in this case, as there’s already a cheat menu anyway) I was wondering what the most efficient way to create a pausing game system would be?

The only idea I have on the top of my head is to incorporate a global “frame counter” variable that increases by 1 each renderframe, and stop increasing this value when the game is “paused”, but I don’t want this value to get too big.

Depends on if you are using loops or not, if you are using just events, and a UI for example just have pausing disable the events / UI

i.e if not Paused then ect.

If you have a loop you will have to restart the loop whenever you unpause.