Billing and restricting traffic are 2 different things..
You can do a simple time acl in squid (right from the docs):
acl USER1 proxy_auth Dick
acl USER2 proxy_auth Jane
acl DAY time 06:00-18:00
http_access allow USER1 DAY
http_access deny USER1
http_access allow USER2 !DAY
http_access deny USER2
or
acl FOO src 10.1.2.3 10.1.2.4
acl WORKING time MTWHF 08:30-17:30
http_access allow FOO WORKING
http_access deny FOO
but it's not too flexible , so for controlling access based on units of time, may I suggest squidGuard.. you can install it without interfering with a running squid too much - it is an add-on program for squid. squidGuard has exactly what you want if you need to control end user access based on time of day, hours per week/day. It will allow you to write rules for ACLs which you create, then rewrite URLs, redirect to a CGI, or silently drop, based on these rules - and you can create if/then/else for actions based on being "within" or "outside" of your time space ACL . All of it is detailed in the documentation, and the contrib section contains some handy Perl examples too - so squidGuard might be a fast solution to most of your problem.
If you really need to do billing, it'll be more work, not to mention hitting issues as pointed out by
zigdon, with regard to cached content.
tachyon's one-liner is awesome for getting the bytes used out of the squid log ( actually my 2.5.STABLE3 out of the box logs had a different field layout requiring minor changes to get the output ) but you'll have to take action based on that, and reading logs is always after the fact.