Discipline. If you know how much time you're wasting, you can get more productive.
put that in your browser and it'll stop you when you hit your time limit (you can change the time also)
I use cooltimer when I notice I'm slouching a lot, to remind myself to sit up straight (also good to make sure you don't give yourself RSI)(you can also put in whatever notification sound you want, Homer Simpson's "D'oh" for example)
I used to have a time tracker to keep track of how long I spent on things but I lost it. I don't like the web based ones, because I do better when the internet is turned off.
There was an interesting article about a game shop working like 6 hours a day and being super productive. (this article has more meat then the book on flow they reference
notes from that book:
Aspects that can create flow
1. an accomplishable task
2. able to concentrate on it
3. clear goals for it
4. gives immediate feedback
5. absorbed in it (un related thoughts and stimulus do not get computed)
6. feel you have some control over the outcome
to simple you won't get engaged, too hard you'll just be frustrated, needs to be just challenging enough