I set a timer for 20 minute segments. Since I'm ADHD I've learned to use a timer for everything. If I get off task it will refocus me and I don't waste huge amounts of time. It also reminds me to get up, stretch, get blood recirculating in the legs, etc. It is really useful when I get on the computer.