skafy Posted January 26, 2016 Posted January 26, 2016 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; Quote
bugra Posted January 26, 2016 Posted January 26, 2016 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. Quote
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.