Dear team, Kindly note that im using Rho::Timer.start (timer API) for session time out def x Rho::Timer.start(300000, (url_for :action => :timer_callback), 'sessionTimeOut'); end but i think this is not working. can u please explain me the process of the timer, how it works? it works on events or what ? is there any difference between Rho::Timer.start and Rho::System.startTimer ???
Rho::Timer.start |
1 Replies
Use code (ruby) below. It well tested and works fine :
class TimerController < Rho::RhoController @@update_timer = Rho::Timer.create() def start_update @@update_timer.start( 1000, url_for( :action => :timer_update ) ) end
def timer_update # do something # ... @@update_timer.start( 1000, url_for( :action => :timer_update ) ) end
end