you are viewing a single comment's thread
view the rest of the comments
[–] 12 points 1 year ago (3 children)

it's

while (true) {
    let t = Date.now();
    if (timeoutMap.has(t)) timeoutMap[t]();
}

of course. Clearly O(n).

disclaimerFeel free to use it. I guarantee it is bug free. Comes with express warranty. This notice is legally binding.

  • source
  • parent
  • hideshow 3 child comments