]> Repositories - hackapet/Adafruit_Blinka.git/blobdiff - python/agnostic.py
Reversed mistakenly committed tweak. Introduced conservative garbage collection to...
[hackapet/Adafruit_Blinka.git] / python / agnostic.py
index 167b4d607b4d46f7afc7c70678a1645bb13c6964..154360abf08bda79e5413f8326336f71f2ae7966 100644 (file)
@@ -4,7 +4,9 @@
     environment is established, can choose various routes to make available and re-export
     common modules and operations, depending on platform support
 """
+import gc
 import sys
+gc.collect()
 
 try:
     microcontroller = sys.platform
@@ -24,6 +26,7 @@ else:
 
 implementation = sys.implementation.name
 if implementation == "micropython":
-    from utime import sleep, time
+    from utime import sleep
 elif implementation == "circuitpython":
-    from time import sleep, time
+    from time import sleep
+gc.collect()