lib/turntabler/client.rb
def reset_keepalive(interval = 10)
      if !@keepalive_timer || @keepalive_interval != interval
        @keepalive_interval = interval

        # Periodically update the user's status to remain available
        @keepalive_timer.cancel if @keepalive_timer
        @keepalive_timer = EM::Synchrony.add_periodic_timer(interval) do
          Turntabler.run { user.update(:status => user.status) }
        end
      end
    end
def reset_keepalive(interval = 10)
      if !@keepalive_timer || @keepalive_interval != interval
        @keepalive_interval = interval

        # Periodically update the user's status to remain available
        @keepalive_timer.cancel if @keepalive_timer
        @keepalive_timer = EM::Synchrony.add_periodic_timer(interval) do
          Turntabler.run { user.update(:status => user.status) }
        end
      end
    end
Resets the keepalive timer to run at the given interval.

 @param [Fixnum] interval The frequency with which keepalives get sent (in seconds)
 @api private