Created
June 27, 2017 05:05
-
-
Save jshvarts/e2116d9cebdae9c3e27bffdebd14682f to your computer and use it in GitHub Desktop.
currentTimeMillis way in Java
This file contains 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(); | |
// some code block here | |
long elapsedTime = System.currentTimeMillis() - startTime; | |
System.out.println("Execution took (in millis): " + elapsedTime); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment