Rho::Timer.start

e elie matta 3 years 7 months ago
1 1 0

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  ???

Please Register or Login to post a reply

1 Replies

T TAU TECHNOLOGIES

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

CONTACT
Can’t find what you’re looking for?