How can a function rate-limit its calls? The calls should not be discarded if too frequent, but rather be queued up and spaced out in time, X milliseconds apart. I\'ve looked at
While the snippets offered by others do work (I've built a library based on them), for those who want to use well-supported modules, here are the top choices: