As a developer, I find a couple of situations require waiting for as much as 30 seconds before I can continue my task. For example, getting the latest version of the database scripts from source control, or compiling a multi-project solution.
If I know that I'll have to wait more than a few seconds, I'll have an internal conversation similar to the following:
"I know, while I'm waiting, I'll quickly read that email that arrived just now, or make a quick cuppa, or find out how Julian's getting on with re-writing the subtraction method, or something, or anything, just so long as I'm not sitting about waiting in an bowl of cold, damp unproductivity, waiting for my boss to catch me slacking, and then fire me, and then escort me out of the building without letting me collect so much as the photo of my children..."
So, I'll read the email that just arrived, which may need a reply, so I might as well do that while I'm there, or it's a link to an amusing video on Google, so I may as well watch it while I'm there, or I'll make a cuppa (and have to go and find some milk), or I'll talk to Julian, who says "Fine thanks, and by the way, did I tell you about my chess match last night? Well, Frank picked white, which makes a change..." and then five minutes have passed.
So instead of not writing code for 30 seconds, I'm not writing code for 300 seconds (or more, depending on how devious Frank was). It's extremely rare for anything to crop up that's more important than writing code (or whatever it is I'm supposed to be doing on any given day), so I'm better off "wasting" the 30 seconds staring at the screen watching the compiler do its thing than try to do something "useful".