In general, such a topic, wrote a utility on Delphi, which runs simultaneously with the computer and includes a brush that counts the time of the program, and at the same time the time of the computer. I got the idea to make a log file with all the information. He should save by clicking on the button (Button1). It turned out this way, it saves but once, with the subsequent saving it erases the old log and writes a new one in its place.
ZY The log is saved in the TXT document.