Starting and pausing script

Hello there, i've just recently started learning javascript and i'm really excited.


I'm currently working on a time-system and i want the timer to start when the player starts a new game, or continues from a save.


I've got it working on New Game by adding a simple plugin command to call the timer function, but of course this doesnt work when i'm starting the game from a save.


Also, i can't find a way to pause the timer when the player goes to menu.


Any ideas ?


Thanks

Original thread: https://forums.rpgmakerweb.com/threads/starting-and-pausing-script.56807/