I intend to write something to do this soon, at the request of my wife. Basically, you need a cron job or something similar that edits /etc/hosts - shouldn't be too difficult.
But it would work better for people who don't know enough to manually edit /etc/hosts.
EDIT: the /etc/hosts thing would be to block specific sites, but it's just as easy to take the internet connection down completely with ifconfig or whatever your system uses.
Alternatively, you can unplug a cable / disable WiFi.