I think it is essential to avoid the “raw” sources like Twitter or Google News, and instead scan what bubbles up into higher-level sources such as HN, reddit or newsletters.
I also meter my time on various projects using Toggl Track so I can monitor how I am using my time. Tracking also acts like a promise to myself that I will focus on something: e.g I start the timer to focus on X, and it acts as a subtle nudge to keep me honest and really focus on X.