Add the GetEndingTime function to SpecTools