$ cnpm install time-promise
Timing sync or promise-returning functions.
npm install time-promise --save
var value = time(syncFunction)();
// prints timing, returns value from syncFunction
time(promiseReturningFunction)().then(...)
// prints timing after the function executes
// returns the original promise
Author: Gleb Bahmutov © 2013
License: MIT - do anything with the code, but don't blame me if it does not work.
Support: if you find any problems with this module, email / tweet / open issue on Github
Copyright 2014 - 2017 © taobao.org |