How to calculate Execution time of Program |

Опубликовано: 20 Июль 2022
на канале: CodingWithKaushik
977
34

How to caluclate the time which our computer taking to execute our program.

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 .

But now we know that how we can calculate the time of Executing of our Program.


Смотрите видео How to calculate Execution time of Program | онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь CodingWithKaushik 20 Июль 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 977 раз и оно понравилось 34 людям.