mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 19:50:30 +01:00
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)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user