title image


Smiley Re: Zeitmessung...
var LibCounter1, LibCounter2, LibFreq: int64;procedure UhrEin;begin QueryPerformanceCounter(LibCounter1);end;procedure UhrAus;var Std, Min, Sek, MSek: cardinal; S: string;begin QueryPerformanceFrequency(LibFreq); QueryPerformanceCounter(LibCounter2); MSek := round((LibCounter2 - LibCounter1) / LibFreq * 1000); Std := MSek div 3600000; MSek := MSek mod 3600000; Min := MSek div 60000; MSek := MSek mod 60000; Sek := MSek div 1000; MSek := MSek mod 1000; S := inttostr(Sek) +','+ IntToStrF(MSek,3,'0') +' Sek.'; if (Std > 0) or (Min > 0) then S := inttostr(Min) +' Min. ' + S; if (Std > 0) then S := inttostr(Std) +' Std. ' + S; ShowMessage('Dauer: '+S);end;begin UhrEin; { ... } UhrAus;end;Joachim

geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: