Add time calculation