consumer.js 255 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 var Producer = require('./producer'); var producer = new Producer(); producer.on('add', function(t) { console.log('add:', t); }); producer.start(); // stop the clock 10 seconds after // setTimeout(function() { // clock.stop(); // }, 10e3)