MVakili Posted August 1, 2021 Share Posted August 1, 2021 I start a new project , then add a unibitbtn and wrote this lines for test procedure TMainForm.UniBitBtn1Click(Sender: TObject); begin begin try showmask('Wait...'); unisession.syncronize; Sleep(1000); finally hidemask; unisession.syncronize(); end; end; end; But it says [dcc32 Error] Main.pas(40): E2003 Undeclared identifier: 'syncronize' whats wrong ? should I add any unit ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 1, 2021 Share Posted August 1, 2021 15 minutes ago, MVakili said: [dcc32 Error] Main.pas(40): E2003 Undeclared identifier: 'syncronize' Synchronize Quote Link to comment Share on other sites More sharing options...
MVakili Posted August 1, 2021 Author Share Posted August 1, 2021 tank you Quote Link to comment Share on other sites More sharing options...
MVakili Posted August 1, 2021 Author Share Posted August 1, 2021 another question ShowMask('Wait ...'); unisession.Synchronize; T1:=Now; .................... Do Somthing T2:=Now; P1.Caption:=IntToStr(SecondsBetween(T1, T2)) Always shows 0 how I can calculate the time of proccess Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 1, 2021 Share Posted August 1, 2021 12 minutes ago, MVakili said: Always shows 0 Perhaps this is the correct calculated time. What code is being executed? Quote Link to comment Share on other sites More sharing options...
MVakili Posted August 1, 2021 Author Share Posted August 1, 2021 1 minute ago, Sherzod said: Perhaps this is the correct calculated time. What code is being executed? ShowMask('Wait ...'); unisession.Synchronize; T1:=Now; QR1.Close; QR1.SQL.Text:='Select some field from some table ..........................'; Try QR1.OPen; Except on E:Exception Do Begin ShowMessage('....................'); Exit; End; End; G1.DataSource:=DQR1; T2:=Now; P1.Caption:=IntToStr(SecondsBetween(T1, T2)) Quote Link to comment Share on other sites More sharing options...
MVakili Posted August 2, 2021 Author Share Posted August 2, 2021 15 hours ago, MVakili said: ShowMask('Wait ...'); unisession.Synchronize; T1:=Now; QR1.Close; QR1.SQL.Text:='Select some field from some table ..........................'; Try QR1.OPen; Except on E:Exception Do Begin ShowMessage('....................'); Exit; End; End; G1.DataSource:=DQR1; T2:=Now; P1.Caption:=IntToStr(SecondsBetween(T1, T2)) Found it 1- its not Sec .. it is ms 2- its not IntToStr ... its FloatToStr 3- it seems work with Time not Now So we can use this Var T1 ,T2 : TTime; Begin Try ShowMask('Wait ...'); unisession.Synchronize; T1:=Time; .................... Do Somthing T2:=Time; P1.Caption:=FloatToStr(MilliSecondsBetween(T1, T2)) ; Finally HideMask; End; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.