Doba vykonávania funkcie
utorok, august 31st, 2010//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "Unit2.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm2 *Form2; //--------------------------------------------------------------------------- __fastcall TForm2::TForm2(TComponent* Owner) : TForm(Owner) { TDateTime t(Now()); for(int x=0;x<1000;x++){Sleep(1); } TDateTime u(Now()); Caption=AnsiString(FormatFloat("0.000",(double(u-t)*24*3600)))+" sec"; t=u; } //---------------------------------------------------------------------------