Skip to content

Instantly share code, notes, and snippets.

@draco2003
Created October 17, 2012 02:05
Show Gist options
  • Save draco2003/3903315 to your computer and use it in GitHub Desktop.
Save draco2003/3903315 to your computer and use it in GitHub Desktop.
non-blocking function call
backendEvents.once('process_metrics', function (){
pm.process_metrics(metrics_hash, flushInterval, time_stamp, function emitFlush() {
// Flush metrics to each backend.
backendEvents.emit('flush', time_stamp, metrics_hash);
});
});
backendEvents.emit('process_metrics', time_stamp, metrics_hash);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment