You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While effort has been made to support running outside of micropython, some non-standard functions are still used.
I've stubbed them like so:
import time
if not hasattr(time, 'ticks_ms'):
ticks_ms = lambda : time.clock() * 1000.
else:
ticks_ms = time.ticks_ms
if not hasattr(time, 'ticks_diff'):
ticks_diff = lambda a, b: b - a
else:
ticks_diff = time.ticks_diff
Then used ticks_diff() and ticks_ms() instead of time.ticks_diff() and time.ticks_ms() respectively.
I believe this is correct, you may want to verify ticks_diff's polarity.
The text was updated successfully, but these errors were encountered:
Thanks for the suggestion. As I mentioned in my first reply to #1 the main goal with slimDNS is minimal memory footprint when run on micropython, so I've been trying to avoid adding extra code like this. That said, if there is genuine interest in a version that runs on other platforms then I can look into it.
My primary motivation was the simplicity of the design (read: lightweight), being able to test on Windows would allow me to validate if its the right thing that I need, as well as use it to detect micropython devices asking the question part of the server.
While effort has been made to support running outside of micropython, some non-standard functions are still used.
I've stubbed them like so:
Then used
ticks_diff()
andticks_ms()
instead oftime.ticks_diff()
andtime.ticks_ms()
respectively.I believe this is correct, you may want to verify ticks_diff's polarity.
The text was updated successfully, but these errors were encountered: