Actually, at least for me, I end up being MORE productive in my work and tend to work for longer stretches if I'm afking RS on the side, as I don't feel the temptation to play as much because I am already playing.
It all really depends on the person. All I know is, when I do my course work, I study for maybe 1-2 hour stretches. When I do my course work while mining Seren Stones, I end up studying for 3-4 hour stretches, sometimes even more. Probably some psychological reason, but it works very well for me.