As I note below, RescueTime is an excellent app for this. It’s very fine grained, automatically keeps track of every program you use and website you visit separately down to the second, and requires basically no interaction to run except to check up on yourself at the end of the day; if you tell it which activities/websites are productive it’ll also tell you how much of the time you’re actually working, and how that gets distributed about the hour/day/week/month. (It probably goes up to year as well, but I haven’t been using it long enough to check.) Overall I am very impressed with it.
As I note below, RescueTime is an excellent app for this. It’s very fine grained, automatically keeps track of every program you use and website you visit separately down to the second, and requires basically no interaction to run except to check up on yourself at the end of the day; if you tell it which activities/websites are productive it’ll also tell you how much of the time you’re actually working, and how that gets distributed about the hour/day/week/month. (It probably goes up to year as well, but I haven’t been using it long enough to check.) Overall I am very impressed with it.