I do this exact thing. And make jokes to my team about how I practice "beverage-driven development"
Since quite some time, the bio on my Twitter is "This process emits code when Premium Cola is present on stdin."
Some time ago, I was making myself another cup at work late afternoon when my boss came, and he asked me if I'm staying longer today. I said no, I'm just staying for about one more tea. He asked me, jokingly, if I measure my work time in teas? I said, actually, I do - one tea takes me ~25-30 minutes to drink, so it's a pretty good unit of time...