If you use source control you can use svn (or any other) hooks on commit and checkout that log timestamps to a db, etc when you check your project out and when you check it back in.
The trick to making this work - and it is easiest on single developer projects - is to MAKE SURE you check your work in when you are done working for a period of time, and that you check it out immediately prior to doing actual work.
This might not be feasible for your project. Build process checking etc suffers from the same issues - namely that you might work for 3 hours and then build 8 hours after that.