You can make use of the Auto Start Timer App to calculate the time spent on tickets based on the statuses you set. To know more about this check out the link.