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 LED
use Node sleep package. https://www.npmjs.com/package/sleep.
in your code you can use
var sleep = require('sleep'); sleep.sleep(n)
to sleep for a specific n seconds.