I did play on online casinos in my office before. It was the time when I did not have much to do in office. I tried everything actually. I watched movies, played games, did trades, and did some other stuff with my officemates. I have a lot of work experience and this only happened more than a year since I later realized that I should try to make myself busy with something that is work-related.
Both online and peer-to-peer sports betting during work hours are common to me since this doesn't consume a lot of time. However, there were also times when I had to watch games live online or on our office televisions because having a bet makes games more exciting to watch. But of course, I made sure that it wouldn't affect my regular output at work.
Well, it will actually take some level of maturity to not let playing or gambling in office during work hours affect your output in work, for personally, i think its not about the game itself, but the outcome of the game, and that this does not affect your productivity at work also largely depends on the type of work you are doing, although i do have in mind that you mentioned that you mostly do this when you don't have much to do at your office.
But then, let's consider those who pretty busy at work having to spare sometime in-between work to watch a match they probably have betted some reasonable amount of money on, believing that he or she would win the bet, but unluckily, his team lost, and he watched every bit of that match at work. Do you think that the outcome of that game will not somehow, negatively affect that Persons's productivity at work for the rest of that day?, not actually the outcome of the game, but the money he or she lost when he or she already believed that he or she would win the game.