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.

  • 2
    And the question is what? And why do this? 1 - there are functions to retrieve the running time from the last boot. 2 - there is an assembler function (RDTSC), which gives the most accurate time at all from the start of the processor (that is, from turning on the computer). - Dex

2 answers 2

How to file write. Rewrite - overwrite, append - add.

    //var Tfile:TextFile; AssignFile(Tfile,f);//f-путь if (FileExists(f)=true) then begin Append(Tfile); writeln(Tfile,Memo1.Text);//Memo1.Text-текст для записи end else begin Rewrite(Tfile); writeln(Tfile,Memo1.Text); end; CloseFile(Tfile);