Question: I'm currently trying to learn nodejs and a small project I'm working is writing an API to control some networked LED lights.

The microprocessor controlling the LEDs has a processing delay, and I need to space commands sent to the micro at least 100ms apart. In C# I'm used to just calling Thread.Sleep(time), but I have not found a similar feature in node.

I have found several solutions using the setTimeout(...) function in node, however, this is asynchronous and does not block the thread ( which is what I need in this scenario).

Is anyone aware of a blocking sleep or delay function? Preferably something that does not just spin the CPU, and has an accuracy of +-10 ms?

Answer: 
It's pretty trivial to implement with native addon, so someone did that: <https://github.com/ErikDubbelboer/node-sleep.git>
Blocking in Node.js is not necessary, even when developing tight hardware solutions. See [temporal.js](https://github.com/rwaldron/temporal) which does not use `setTimeout` or `setInterval`setImmediate. Instead, it uses [`setImmediate`](https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate) or `nextTick` which give much higher resolution task execution, and you can create a linear list of tasks. But you can do it without blocking the thread.