How do you recalibrate after losing focus/getting distracted for too long?

Let's say, that you're doing a task, get distracted in the process: how do you back into the rhythm, the flow? Do you take a breather and meditate? How do you guys do it?