We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbe2a3c commit fe3a06fCopy full SHA for fe3a06f
examples/bitcoin_demo.py
@@ -34,15 +34,13 @@ def text_transform(val):
34
magtag.preload_font(b"$012345789") # preload numbers
35
magtag.preload_font((0x00A3, 0x20AC)) # preload gbp/euro symbol
36
37
-timestamp = time.monotonic()
+timestamp = None
38
39
while True:
40
- if (time.monotonic() - timestamp) > 5: # once a second...
+ if not timestamp or (time.monotonic() - timestamp) > 60: # once every 60 seconds...
41
try:
42
value = magtag.fetch()
43
print("Response is", value)
44
except (ValueError, RuntimeError) as e:
45
print("Some error occured, retrying! -", e)
46
timestamp = time.monotonic()
47
-
48
- time.sleep(0.01)
0 commit comments