When Is It Time to Quit Pursuing a Goal?