handle negative time value and prevent a divide by zero