One who remembers while eating dairy that he is within six hours of meat must stop at once, for the wait is a complete halacha, as Beit Yosef writes following the Rambam, not a geder. Kaf HaChaim, citing Da'at Kedoshim, would let him finish. After a meat dish without meat, the Shulchan Aruch permits; custom is to wait.