Self control perhaps?
I’m addicted to browsing forums at work, but when stuff needs to get done, I get it done.