Skip to content

Commit 7d94b3e

Browse files
committed
fix for 6.x - montonic_ns returns NotImplementedError
1 parent 7802059 commit 7d94b3e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

adafruit_led_animation/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ def const(value): # pylint: disable=missing-docstring
3434

3535

3636
try:
37-
from time import monotonic_ms
37+
from time import monotonic_ns
38+
39+
monotonic_ns() # Test monotonic_ns in 6.x
3840

3941
def monotonic_ms():
4042
"""
@@ -43,7 +45,7 @@ def monotonic_ms():
4345
return monotonic_ns() // NANOS_PER_MS
4446

4547

46-
except ImportError:
48+
except (ImportError, NotImplementedError):
4749
import time
4850

4951
def monotonic_ms():

0 commit comments

Comments
 (0)