File tree 1 file changed +5
-5
lines changed 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 26
26
__version__ = "0.0.0+auto.0"
27
27
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Display_Text.git"
28
28
29
- from adafruit_ticks import ticks_ms
29
+ import adafruit_ticks
30
30
from adafruit_display_text import bitmap_label
31
31
32
32
try :
@@ -81,10 +81,10 @@ def update(self, force: bool = False) -> None:
81
81
Default is False.
82
82
:return: None
83
83
"""
84
- _now = ticks_ms ()
85
- if _now < self . _last_animate_time : # ticks_ms has rolled over
86
- self ._last_animate_time = _now
87
- if force or self . _last_animate_time + ( self . animate_time * 1000 ) <= _now :
84
+ _now = adafruit_ticks . ticks_ms ()
85
+ if force or adafruit_ticks . ticks_less (
86
+ self ._last_animate_time + int ( self . animate_time * 1000 ), _now
87
+ ) :
88
88
if len (self .full_text ) <= self .max_characters :
89
89
super ()._set_text (self .full_text , self .scale )
90
90
self ._last_animate_time = _now
You can’t perform that action at this time.
0 commit comments