Jump to content

Recommended Posts

Posted

I would like to have a timer witch will run every 30 seconds. It has to start when application starts and should not be attached to sessions. So my question is how can I use global variable Timer. I've put it in ServerModule but than I can't use it on mainModule data.

procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject);
begin
  Timer1.Enabled:= True;
  Send:= False;
end;

procedure TUniServerModule.Timer1Timer(Sender: TObject);
var
  Time: TTime;
begin
  Time:= StrToTime(TimeToStr(Now));
  if Send then
  begin
    if (Time > StrToTime('12:12:00')) AND (Time < StrToTime('12:13:00')) then
      Send:= False;
  end
  else
  begin
    if (Time > StrToTime('12:11:00')) AND (Time < StrToTime('12:12:00')) then
      Send:=
end;
Posted

Hi

 

What exactly you wanna do? As I understood you wanna send some datas in every 30 secs whether sessions open or close, right? Then UniThreadTimer is you looking for. 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...