mirror of https://github.com/espruino/BangleApps
powermanager - Fix wrapping of deferred functions with parameters
parent
769c4c2793
commit
7f20125fd9
|
@ -84,7 +84,7 @@
|
|||
if (!a.__wrapped){
|
||||
wrapped = ()=>{
|
||||
let start = Date.now();
|
||||
let result = a.apply(undefined, arguments.slice(1));
|
||||
let result = a.apply(undefined, arguments.slice(2)); // function arguments for deferred calls start at index 2, first is function, second is time
|
||||
let end = Date.now()-start;
|
||||
let f = a.toString().substring(0,100);
|
||||
if (settings.logDetails) logDeferred(t, end, f);
|
||||
|
|
Loading…
Reference in New Issue