def ping_time(ip, n=<NUM_LIT:5>):
cmd = "<STR_LIT>".format(ip, n)<EOL>p = subprocess.Popen(cmd.split("<STR_LIT:U+0020>"), stdout=subprocess.PIPE)<EOL>output = str(p.communicate()[<NUM_LIT:0>])<EOL>stats = output.split("<STR_LIT:\n>")[-<NUM_LIT:1>].split("<STR_LIT>")[-<NUM_LIT:1>].split("<STR_LIT:/>")<EOL>avg_ping_time = float(stats[<NUM_LIT:1>])  <EOL>return avg_ping_time * <NUM_LIT:1000><EOL>
Returns the average ping time in microseconds.

Note: This function is inherently platform specific.
It currently works on Midway.