A person who became tamei may not eat terumah until sunset, and the Rambam wrote like a third of an hour after sunset, meaning less than twenty minutes. And likewise here, when he wrote like six hours, it is not six hours exactly. And Yabia Omer deduced that if less than half an hour is lacking, one may eat dairy.