summaryrefslogtreecommitdiff
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-12-22 00:29:32 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-12-22 00:29:32 +0300
commitd02f6a9956760425188f517f3708c76123e53d2a (patch)
tree91b60d0baa22fbd9ee1b39162289143b2d80f328 /py/mpconfig.h
parentef23399e32f03d251942b7a29c720a9cf72a1c26 (diff)
extmod/modutimeq: Refactor into optimized class.
import utimeq, utime # Max queue size, the queue allocated statically on creation q = utimeq.utimeq(10) q.push(utime.ticks_ms(), data1, data2) res = [0, 0, 0] # Items in res are filled up with results q.pop(res)
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 7a71ebd95..8cf4bbb77 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -945,6 +945,11 @@ typedef double mp_float_t;
#define MICROPY_PY_UHEAPQ (0)
#endif
+// Optimized heap queue for relative timestamps
+#ifndef MICROPY_PY_UTIMEQ
+#define MICROPY_PY_UTIMEQ (0)
+#endif
+
#ifndef MICROPY_PY_UHASHLIB
#define MICROPY_PY_UHASHLIB (0)
#endif