Fixed a bug in timer.js
The last delta was not saved