grings

Mostra o tempo de execuacao

Jan 4th, 2012
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.29 KB | None | 0 0
  1. //Mostra a diferenca de tempo
  2. procedure TfrmPesquisa.Pesquisa;
  3. var
  4.    t: Integer;
  5.    Tempo: TDateTime;
  6. begin
  7.    t := GetTickCount;
  8.    Pesquisar;
  9.    sleep(1000);
  10.  
  11.    Tempo := (GetTickCount - t) / MSecsPerSec / SecsPerDay;
  12.    ShowMessage(FormatDateTime('hh:nn:ss:zzz', tempo));
  13. end;
Advertisement
Add Comment
Please, Sign In to add comment