function calculateExpirationTime (rawRoutingTable, routerAddress) {
  try {
    const now = int(Date.now())
    const expires = int(rawRoutingTable.ttl)
      .multiply(1000)
      .add(now)
    // if the server uses a really big expire time like Long.MAX_VALUE this may have overflowed
    if (expires.lessThan(now)) {
      return Integer.MAX_VALUE
    }
    return expires
  } catch (error) {
    throw newError(
      `Unable to parse TTL entry from router ${routerAddress} from raw routing table:\n${json.stringify(
        rawRoutingTable
      )}\nError message: ${error.message}`,
      PROTOCOL_ERROR
    )
  }
}
Call the expiration time using the ttls from the raw routing table and return it

@param {RawRoutingTable} rawRoutingTable the routing table
@param {string} routerAddress the router address
@returns {number} the ttl