Skip to content

use ms and seconds instead of ns. #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions adafruit_ducky.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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":
Expand Down