def METHOD_NAME(net_connect_newconn, test_timeout, allowed_percentage):
    # Explicitly send expect_string so timing is more accurate
    my_prompt = net_connect_newconn.find_prompt()
    pattern = re.escape(my_prompt)
    my_except, exec_time = show_long_running(
        net_connect_newconn, read_timeout=test_timeout, expect_string=pattern
    )
    # Returned exception should be read_timeout
    assert isinstance(my_except, ReadTimeout)
    # Calculate difference in execution time from timeout
    time_diff = abs(exec_time.total_seconds() - test_timeout)
    # Convert difference to a percentage of expected timeout
    time_margin_percent = time_diff / test_timeout * 100
    # Margin off should be less than the allowed_percentage
    assert time_margin_percent < allowed_percentage