cm0002@lemmy.world to Programmer Humor@programming.dev · 1 day agotimeoutSortlemmy.mlimagemessage-square32fedilinkarrow-up1435arrow-down14cross-posted to: programmerhumor@lemmy.ml
arrow-up1431arrow-down1imagetimeoutSortlemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 1 day agomessage-square32fedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squaresus@programming.devlinkfedilinkarrow-up10·12 hours agoit’s while (true) { let t = Date.now(); if (timeoutMap.has(t)) timeoutMap[t](); } of course. Clearly O(n). disclaimer Feel free to use it. I guarantee it is bug free. Comes with express warranty. This notice is legally binding.
minus-squareyetAnotherUser@lemmy.calinkfedilinkarrow-up1·12 hours agoThen don’t complain once you get arrested…
minus-squareulterno@programming.devlinkfedilinkEnglisharrow-up0·4 hours agoFrom nowaday’s standards, that’s express warranty that lasts until you start executing your code.
it’s
while (true) { let t = Date.now(); if (timeoutMap.has(t)) timeoutMap[t](); }of course. Clearly O(n).
disclaimer
Feel free to use it. I guarantee it is bug free. Comes with express warranty. This notice is legally binding.
Then don’t complain once you get arrested…
From nowaday’s standards, that’s express warranty that lasts until you start executing your code.