Test improvement on timing function