def time_since_last_communication
      state_file = @options[:state_path] || File.join(AgentConfig.agent_state_dir, 'state.js')
      state = @state_serializer.load(File.read(state_file)) if File.file?(state_file)
      state.nil? ? (@options[:time_limit] + 1) : (Time.now.to_i - state["last_communication"])
    end
def time_since_last_communication
      state_file = @options[:state_path] || File.join(AgentConfig.agent_state_dir, 'state.js')
      state = @state_serializer.load(File.read(state_file)) if File.file?(state_file)
      state.nil? ? (@options[:time_limit] + 1) : (Time.now.to_i - state["last_communication"])
    end
Get elapsed time since last communication

 === Return
 (Integer):: Elapsed time