"is finally terminated by judgment or otherwise, including the time necessary" . . . .