Measure the speed of a callback - console.log by default, can be set to alert