Skip to content

Commit 75c56ac

Browse files
committed
iperf3: Get working on the unix port of MicroPython.
Signed-off-by: Damien George <damien@micropython.org>
1 parent a7c805c commit 75c56ac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python-ecosys/iperf3/iperf3.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ def main():
534534
client(opt_host, opt_udp, opt_reverse)
535535

536536

537-
if sys.platform == "linux":
537+
if sys.implementation.name != "micropython":
538538

539539
def pollable_is_sock(pollable, sock):
540540
return sock is not None and pollable[0] == sock.fileno()
@@ -544,12 +544,12 @@ def ticks_us():
544544

545545
def ticks_diff(a, b):
546546
return a - b
547-
548-
if __name__ == "__main__":
549-
main()
550547
else:
551548

552549
def pollable_is_sock(pollable, sock):
553550
return pollable[0] == sock
554551

555552
from time import ticks_us, ticks_diff
553+
554+
if sys.platform == "linux" and __name__ == "__main__":
555+
main()

0 commit comments

Comments
 (0)