I used to eat a biscuit every time I was waiting for my PC to reboot. It was hard to stay thin while running Windows 98.
I have a second laptop next to me so I can do something completely unrelated while waiting for my code to compile. If I watch my code compile, I’ll start reading the logs and I WILL start investigating one of the 243 linting errors I inherited from the other devs.
By the end of the week, I’m sometimes switching between 3 different branches and raising a 5-line pull request for the one thing I was asked to do. I then have a 100+ line PR because I refactored some trash module to shave 200ms off the program startup time.
Back to your question of how I manage waiting. I don’t manage. I have a dream that one day my codebase won’t be trash and I can make a change without invoking an 8 minute wait.
At least now that I have stims, I don’t feel the urge to snack every time my mind idles.