Fixed #92. Timer now checks for div by zero.

Added a simple check for a zero value before performing division.