def quiet_ping(hostname, timeout=WAIT_TIMEOUT, count=NUM_PACKETS,<EOL>packet_size=PACKET_SIZE, path_finder=False):
myStats = MyStats()  <EOL>mySeqNumber = <NUM_LIT:0>  <EOL>try:<EOL><INDENT>destIP = socket.gethostbyname(hostname)<EOL><DEDENT>except socket.gaierror as e:<EOL><INDENT>return False<EOL><DEDENT>myStats.thisIP = destIP<EOL>if path_finder:<EOL><INDENT>fakeStats = MyStats()<EOL>do_one(fakeStats, destIP, hostname, timeout,<EOL>mySeqNumber, packet_size, quiet=True)<EOL>time.sleep(<NUM_LIT:0.5>)<EOL><DEDENT>for i in range(count):<EOL><INDENT>delay = do_one(myStats, destIP, hostname, timeout,<EOL>mySeqNumber, packet_size, quiet=True)<EOL>if not delay:<EOL><INDENT>delay = <NUM_LIT:0><EOL><DEDENT>mySeqNumber += <NUM_LIT:1><EOL>if (MAX_SLEEP > delay):<EOL><INDENT>time.sleep((MAX_SLEEP - delay) / <NUM_LIT:1000>)<EOL><DEDENT><DEDENT>if myStats.pktsSent > <NUM_LIT:0>:<EOL><INDENT>myStats.fracLoss = (myStats.pktsSent - myStats.pktsRcvd)/ myStats.pktsSent<EOL><DEDENT>if myStats.pktsRcvd > <NUM_LIT:0>:<EOL><INDENT>myStats.avrgTime = myStats.totTime / myStats.pktsRcvd<EOL><DEDENT>return myStats.maxTime, myStats.minTime, myStats.avrgTime, myStats.fracLoss<EOL>
Same as verbose_ping, but the results are returned as tuple