My preference is to pre-commit by blocking off time on my calendar in 30, 60, or 90min increments depending on the task. If in the middle of it, I get distracted, I look at the calendar to remind myself.