fixed time tracking bug

The port to coffee script made the time calculation functions not work
properly. Fixed that now.. everything works fine