title: How can a Project Management App handle Task Timers with JavaScript and PHP
body: <p>More recently I have started to see some Project Management applications providing a <strong>Timer</strong> function/button on a Task.</p>
  
  <p>The user can click to start the timer and it will record elapsed time and save to backend for that Task record.</p>
  
  <p>The main reason I have never tried to add this functionality into my Project Management app that I am currently building is due to the fact, as soon as the user browses to another page in the app or web, there JavaScript Timer becomes useless!</p>
  
  <p>One way I have seen some apps tackle this issue is by having every page in the app load using AJAX so that they can have a Timer Bar across the bottom of the screen which will remain there even as they navigate inside the PM app.</p>
  
  <p>This seems like a pretty good method however in my situation I cannot do that.  My Project Management app is a SugarCRM module so I cannot change how the main app flow works.</p>
  
  <p>So my question is, what are some reliable ways to implement Task Timers in a PM app?</p>
  
  <p>I would assume that it might would have to work together with PHP to somewhat stay in sync between the frontend JavaScript Timer and the backend.  </p>
  
  <p>For instance, say you have a Timer running on a Task for a few minutes and then you navigate away from the app.  1 hour later you load the PM app, it would be nice if the JavaScript timer would use the backend start timer time and calculate the elapsed time and then have the JavaScript timer simply start off from where it would have been if you had stayed in the App the whole past hour!</p>
  
  <p>To clarify:</p>
  
  <ul>
  <li>You load PM app and start timer.  It counts up to <code>00:03:00</code></li>
  <li>You navigate away from the app or even close it.</li>
  <li>You come back and load the app 1 hour later.</li>
  <li>THe JavaScript Timer would then start showing <code>01:03:00</code> and counting up from that value.  </li>
  </ul>
  
  <p>Does this sound feasible even?</p>