How to calculate Execution time of the Program | Javascript

Published: 20 July 2022
on channel: CodingWithKaushik
97
5

#javascript #leetcode
There is a inbuilt function Perfomance.now() which take time stamp at current point .

So, we can use that by putting it at the point of starting and ending and we can calculate the time, by taking
difference of Starting time stamp subtract to Ending time stamp.

so here we have written an Example and we console.log timeStam2 - timeStam1 .

and we are getting 7 milliseconds in output .

the Time can be vary accoring to the Pc perfomance .


Watch video How to calculate Execution time of the Program | Javascript online without registration, duration hours minute second in high quality. This video was added by user CodingWithKaushik 20 July 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 97 once and liked it 5 people.