I want to create an application that able to calculate the total time the user (i.e. myself) spent on a particular application, for example Firefox. And this application should
There are many tools to do this like RescueTime etc... but you could use some .net code to knock up an approximation quite quickly.
You would need to poll the list of processes at some given interval,
psList = Process.GetProcesses()
You could use the starttime property and the main window title to get information about each process. I am not sure how to tell which one is active or not.