Aware is a very simple (and free) app that lives in the menu bar of your Mac and keeps track of the amount of time you spend at your computer. It does this by keeping a timer running when you type or move the mouse, and for a moment or so after. However, should it become clear you’re away from your Mac then the timer stops.
A big worry with apps like this when used on a portable Mac is that they might eat battery life but, according to Activity Monitor, Aware’s energy usage is essentially negligible.
For keeping track of working hours, or just for those who are curious, Aware fulfills the brief admirably. It’s simple, effective and free.