Commit 7327966d authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

extmod/modutimeq: Make time_less_than be actually "less than", not less/eq.

This fixes an obvious case of non-fair scheduling of 2 tasks with the same
deadline.
parent 18f12caa
......@@ -66,7 +66,7 @@ STATIC bool time_less_than(struct qentry *item, struct qentry *parent) {
if ((mp_int_t)res < 0) {
res += MODULO;
}
return res < (MODULO / 2);
return res && res < (MODULO / 2);
}
STATIC mp_obj_t utimeq_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment