1 Reply Latest reply on Oct 5, 2016 4:36 AM by TAU TECHNOLOGIES

    Rho::Timer.start

    elie matta

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

        • Re: Rho::Timer.start
          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