Just ask yourself "Am I really enjoying my time, or am I just procrastinating?"
For the former, go on and read Hacker News or play that flash game. For the latter, quit and do something worthwhile--either real work or at least real fun. (Of course just procrastinating and doing nothing really worthwhile can be fun every once in a while. But then at least admit it.)
Just distinguish between surfing and searching. The first is a form of entertainment and the second is connected with problem solving.
(OFC, entertainment can be valuable and educational, and can help solve problems indirectly; I don't want to knock it.)