From de53a105a4cac60d55f02eac1591a25ff848d443 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Wed, 23 Nov 2022 17:15:46 +0100 Subject: [PATCH] Improved time pretty-print function --- RNS/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RNS/__init__.py b/RNS/__init__.py index 6704c79..3c2f2ae 100755 --- a/RNS/__init__.py +++ b/RNS/__init__.py @@ -217,7 +217,10 @@ def prettytime(time, verbose=False): tstr += c - return tstr + if tstr == "": + return "0s" + else: + return tstr def phyparams(): print("Required Physical Layer MTU : "+str(Reticulum.MTU)+" bytes")