Skip to content

Instantly share code, notes, and snippets.

@robertklep
Created May 29, 2013 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertklep/5668245 to your computer and use it in GitHub Desktop.
Save robertklep/5668245 to your computer and use it in GitHub Desktop.
var async = require('async');
var fs = require('fs');
console.time('timeout');
setTimeout(function() {
console.timeEnd('timeout');
}, 500);
console.time('async.times');
async.times(100000, function(n, next) {
fs.readFile(__filename, function() { next(); });
}, function() {
console.timeEnd('async.times');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment