Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

How to calculate EXECUTION TIME in Java! ⏱️

51.5K views on YouTube

How to calculate execution time of a program tutorial example explained

This can be a helpful way to find the execution time if the Big O notation is somewhere between a best case and worst case.

I would not recommend using System.currentTimeMillis(), it’s tied to your OS.
For example: A user can adjust the clock during execution, even to a past date, and this would give you negative time.

#calculate #execution #time