Skip to content

Commit 3909d8f

Browse files
authored
Merge pull request #19 from FoamyGuy/ms_instead_of_ns
use ms and seconds instead of ns.
2 parents 2e32d68 + 47fc498 commit 3909d8f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_ducky.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def loop( # pylint: disable=too-many-return-statements
143143
) -> bool: # pylint: disable=too-many-branches
144144
"""Function that sends a line of the DuckyScript file over hid every time it is called"""
145145

146-
now = time.monotonic_ns()
146+
now = time.monotonic()
147147
if now < self.wait_until:
148148
return True
149149

@@ -179,12 +179,12 @@ def loop( # pylint: disable=too-many-return-statements
179179

180180
if start in ("DEFAULT_DELAY", "DEFAULTDELAY"):
181181
self.wait_until -= self.default_delay
182-
self.default_delay = int(words[1]) * 1000000
182+
self.default_delay = int(words[1]) / 1000
183183
self.wait_until += self.default_delay
184184
return True
185185

186186
if start == "DELAY":
187-
self.wait_until += int(words[1]) * 1000000
187+
self.wait_until += int(words[1]) / 1000
188188
return True
189189

190190
if start == "STRING":

0 commit comments

Comments
 (0)