Search the Community
Showing results for tags 'Timer'.
-
Depending on users login, i set a different TIMEOUT period. So, could be 5 minutes or 10 minutes or 30 minutes. The TuniTimer works GREAT... IF the browser is working properly. See, the TuniTime DEPENDS on the browser to send the timer events. I could the number of timer events that I get and then i know "about" how much time has elapsed and then I can TERMINATE the session. PROBLEM: Lets pretend that the browser is stuck/hanged/lockedup/frozen ORRRRRRR that the laptop went into SLEEP mode, which means the browser isn't even executing. That means my TuniTimer will NEVER send an event to the serverside code for my main form. Thus the session will never timeout. I set a big timeout on the servermodule so that I can control how long each session lasts. I set the servertimeoutsecs to 12 houts and then my TuniTimer helps me terminate sessions after a desired period of time. 5/10/30 minutes. So, if the webbrowser can't send the timer event, how can my mainform get an event on a regular basis WITHOUT relying on the client side to be working? Thanks Davie
-
I have a uniDBListGrid and UnimLabel that I want to refresh (update) via a unimTimer - please advise in Delphi code - thanks. procedure TUniMainModule.UnimTimer1Timer(Sender: TObject); begin UniMainModule.MyQuery.Refresh; // Data is modified externally UniSession.AddJS(MainmForm.UnimDBListGrid1.JSName + '.view.refresh();'); IF DataPanelmForm is Showing (shown via Disclosure) then update etc. DataPanelmForm.lblServicedCalls.Text:= 'ServicedCalls: '+IntToStr(UniMainModule.DataSource1.DataSet.FieldByName('ServicedCalls').AsInteger); UniSession.AddJS(DataPanelmForm.lblServicedCalls.JSName + '.refresh();'); END UniSession.Synchronize;
-
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;
-
how can I avoid not log out if the user is on the login screen? Thanks.