]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Reversed mistakenly committed tweak. Introduced conservative garbage collection to...
authorCefn Hoile <github.com@cefn.com>
Tue, 20 Feb 2018 17:09:51 +0000 (17:09 +0000)
committerCefn Hoile <github.com@cefn.com>
Tue, 20 Feb 2018 17:09:51 +0000 (17:09 +0000)
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
 """
     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
 import sys
+gc.collect()
 
 try:
     microcontroller = sys.platform
 
 try:
     microcontroller = sys.platform
@@ -24,6 +26,7 @@ else:
 
 implementation = sys.implementation.name
 if implementation == "micropython":
 
 implementation = sys.implementation.name
 if implementation == "micropython":
-    from utime import sleep, time
+    from utime import sleep
 elif implementation == "circuitpython":
 elif implementation == "circuitpython":
-    from time import sleep, time
+    from time import sleep
+gc.collect()