WindowWatcher logs to a SQLite database which window and application is in front of all others.
WindowWatcher
WindowWatcher is a FREE application that records to a SQLite database which window and application is in front of all others. The data can be exported in tab-delimited or Property List (PLIST) format. Just start it and leave it!
WindowWatcher is useful if you want to:
* account for your time spent on specific applications or projects.
* know how long you (or your employers) spend playing computer games or some other application.
* know where and how you spend all your time.
Minimum OS: 10.4.
Download a copy now!
Tested by the Softpedia labs and found to be completely clean of adware/spyware components.
WindowWatcher is FREE for your personal use!
http://www.modesittsoftware.com/Products/WindowWatcher/index.html