From 47fc498c34b1181568019bd336588c65838e91d9 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Tue, 19 Nov 2024 14:40:17 -0600 Subject: [PATCH] us ms and seconds instead of ns. --- adafruit_ducky.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adafruit_ducky.py b/adafruit_ducky.py index d588cd7..06a3a7b 100644 --- a/adafruit_ducky.py +++ b/adafruit_ducky.py @@ -143,7 +143,7 @@ def loop( # pylint: disable=too-many-return-statements ) -> bool: # pylint: disable=too-many-branches """Function that sends a line of the DuckyScript file over hid every time it is called""" - now = time.monotonic_ns() + now = time.monotonic() if now < self.wait_until: return True @@ -179,12 +179,12 @@ def loop( # pylint: disable=too-many-return-statements if start in ("DEFAULT_DELAY", "DEFAULTDELAY"): self.wait_until -= self.default_delay - self.default_delay = int(words[1]) * 1000000 + self.default_delay = int(words[1]) / 1000 self.wait_until += self.default_delay return True if start == "DELAY": - self.wait_until += int(words[1]) * 1000000 + self.wait_until += int(words[1]) / 1000 return True if start == "STRING":