Last active
August 26, 2017 17:24
-
-
Save AkshayChordiya/1b8c26f1b16be8c6e8d9b773372db1f4 to your computer and use it in GitHub Desktop.
Execution Time in Java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
long startTime = System.currentTimeMillis(); | |
// Do your task | |
long executionTime = System.currentTimeMillis() - startTime; | |
System.out.println("Execution Time = " + executionTime + " ms"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes @nestorm001. Thanks for noticing. I updated the code.