Run timer always unless user click on button to stop the timer

Hello to everyone
I am very new to frappe .

Firstly Please understand What I have done : I have made a timer using custom script that will active and when user click on the new button but when user refresh it or try to take create new record its start from beginning.
now my questions :

  1. Is there any way to run timer always unless user click on button to stop the timer?
  2. how I will access this timer doctype from everywhere in the app?

Can you share what you have done so far?