Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Switch to time.monotonic_ns() when it's available #10
After 3 days of on-time, the current version of the debouncer code fails test_simple on line 25 - the time returned by monotonic() hasn't ticked yet in the .02 seconds of sleep. The new version passes all the tests. I've run it on an ItsyBitsy M0 Express at boot and at 2 and 3 days, and a Trinket M0 at boot (where it doesn't have
Let me know what you think!
This should close issue #9.
The test will need to be moved to a test directory: https://travis-ci.com/adafruit/Adafruit_CircuitPython_Debouncer/builds/122915364#L362
Here is an example: https://github.com/adafruit/Adafruit_CircuitPython_Motor