Hi All,
I want to log : how much time taken by client action to execute in mobile app. The client action would execute multiple times so I want to get the total time taken for the multiple instances of the client action.
Can anyone please guide me here how should I calculate the time taken by the client action to execute. Also the time would be in milliseconds so how should I get the time in milliseconds.
P.S: Dont want to use any external components.
Hello Kaustubh Kamble,
Check out this forge component Ticks which returns 100-nanosecond interval, So you can calculate the execution time in ms too.
Regards,
Harika R.
Hello Kaustubh ,
You can achieve it by JS method Date.now() and performance.now()
var start = Date.now();
//call the execution action
//$actions.actionname();
var end= Date.now();
var elapsedTime =end - start;
console.log(elapsedTime+'ms');
Try this js , Hope it helps you .
Harika.
Hello Kaustubh,
Please check this Screenshot if its helps you then Check Below OML for reference
Thanks and Regards,
Akshay Deshpande