Top Gear!!! There's probably lots of articles about this. Have searched through lifehacker or one of those types of websites? I think everybody struggles with to some extent (whether studying, working, or creative hobbying). You could try time tracking software. I think some are simple and you just hit start and stop, but others I think track which windows you have open and keep you on task. Good luck and let me know what you find.