I like the gist of this but I think this can be a more generalized function. Something along the lines of `function(timeout, cb) {` and where `cb` would get called repeatedly and it would check if it has enough or not.