Well your best course of action is to plan ahead. Plan at least a day in advance what goals you want to set for the next day. Research and write a hub, read and comment on x# of hubs, research and write posts to your personal or pet blogs.. it matters a lot on what your goals are so set them and then make it a habit to reward yourself for reaching a goal. This way, you turn a bad habit of wasting time in front of a computer into a good habit that is productive and conductive for the lifestyle of your choosing.
If you choose to turn your hobby of writing into a career then you need to treat it more like a career. In a real job you take breaks, lunches, quitting time. Do the same with your writing career. It gets real easy to do when you set those goals.
My day planner is a dry-erase board that I have on the wall above my computer. I see my goals and the time allotments I've given them. If I don't make the time for a given goal, I still take the break I need, come back refreshed and continue on until I do complete it.
I've heard it takes 40 days to break a bad habit. In that same amount of time you can be creating good habits as well.