Added a check in the updateNotification function to see if the time parameter is greater than 0 or not.