Short answer is that this is a fairly difficult problem to solve because of the reasons cited by Erick.
The only way to do it would be to set up something along the lines of WireShark that would analyze all network traffic on the machine and look for requests made to a certain url pattern (facebook) and start a timer whenever it happens. However, there are additional complexities when one wants to say, "I don't want to spend more than 20 minutes here a day" because it's nearly impossible in todays web to define what it means to spend 20 minutes at a site. See this thread on the OS X Hints forums for a helpful discussion on why this is hard. It basically boils down to the way websites do requests for you these days rather than you manually clicking. Of course, if you don't care about the user actually being there, but just giving them 20 minutes a day from the first time the log on to the site, then the problem becomes a little easier.
You could figure out how to write software for your router as one possible project. Using Tomato or DD-WRT gets you the ability to control what's running on your router and would give the centralized access you need to place a sniffer on the whole network (especially if you have multiple PCs you're trying to do this to). Of course, that adds the complexity in of trying to figure out what it means for one person to spend time on the website over against another. If all your PCs are single user then the problems not that hard but if you have multiple users per PC then you run into not even being able to key off of the IP address as a unique user.
If you don't want to program your router, then you'd have to write up a network sniffer and install it on every machine. Something like jNetStream might give you a nice head start as writing a network sniffer probably doesn't qualify as a "simple" program like you thought you were going to write.
Anyway, once you get that set up and running you'd just have to figure out how to hook it into your OS. I doubt any language is really "inappropriate" for that task so have at it!