From d02f6a9956760425188f517f3708c76123e53d2a Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 22 Dec 2016 00:29:32 +0300 Subject: 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) --- py/mpconfig.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'py/mpconfig.h') 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 -- cgit v1.2.3