original_docstring: Calculates the round-trip-time (rtt) of the incoming message by comparing timestamps with the out message
  
          Args:
              in_msg (dict): Incoming message
  
          Returns:
              float: roundtrip time of the message
          
docstring: Calculates the round-trip-time (rtt) of the incoming message by comparing timestamps with the out message
docstring_tokens: Calculates the round - trip - time ( rtt ) of the incoming message by comparing timestamps with the out message
code: def calculate_rtt(self, in_msg):
          """Calculates the round-trip-time (rtt) of the incoming message by comparing timestamps with the out message
  
          Args:
              in_msg (dict): Incoming message
  
          Returns:
              float: roundtrip time of the message
          """
          out_msg = next(
              (message for message in self.out_msg_history if message.id == in_msg.prev_msg.id), None)
          rtt = self.env.now - out_msg.timestamp
          return rtt
code_tokens: def calculate_rtt ( self , in_msg ) : out_msg = next ( ( message for message in self . out_msg_history if message . id == in_msg . prev_msg . id ) , None ) rtt = self . env . now - out_msg . timestamp return rtt
short_docstring: Calculates the round-trip-time (rtt) of the incoming message by comparing timestamps with the out message
short_docstring_tokens: Calculates the round - trip - time ( rtt ) of the incoming message by comparing timestamps with the out message
comment: """Calculates the round-trip-time (rtt) of the incoming message by comparing timestamps with the out message
  
          Args:
              in_msg (dict): Incoming message
  
          Returns:
              float: roundtrip time of the message
          """