I have RescueTime installed. It does a good job of tracking how efficient I'm being which is good for me, but it also has a feature that lets you block unproductive sites (like YouTube). Never tried that feature, so I'm not sure how effective it is, but it's probably worth a try.

Having games and work on the same machine is an issue for me as well. Unfortunately I only have one Windows machine, so for now I don't have much of an option, but once I get a desktop PC I'll probably install my games on it and use my laptop for productive stuff.