I agree with jimbokun: measuring "time spent" can be useful in many cases, but it does not measure productivity or quality of work. I understand how difficult it is to measure productivity, but the answer is not to use a poor metric just because it's handy.
It is important to track hours worked per feature or bug in order to improve future estimates. You also want to know if things are taking longer than expected, and why. You may also want to know if finishing and committing fixes and features too quickly leads to more bugs and maybe encourage developers to take more time and get it right the first time.
Is this the kind of thing you have in mind when you want to measure hours worked? That I can certainly agree with.