this post was submitted on 04 Nov 2025
420 points (99.1% liked)

Programmer Humor

27193 readers
1078 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] zea_64@lemmy.blahaj.zone 17 points 11 hours ago (1 children)

Wait till you find out how the runtime manages multiple concurrent timers

[–] sus@programming.dev 10 points 9 hours ago (1 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.

[–] yetAnotherUser@lemmy.ca 1 points 9 hours ago (1 children)

Then don't complain once you get arrested...

[–] ulterno@programming.dev 0 points 1 hour ago

From nowaday's standards, that's express warranty that lasts until you start executing your code.