The duration is currently not saved with the autosaves. That means that if I refresh the page (or crash, or go somewhere else and then come back to writing), the startingtime is 0 and the duration will therefore be wrong.
Solution: Save the duration with the autosaves, and append it when the autosave is loaded.