Created
January 30, 2019 05:15
-
-
Save Aldaviva/0fef1428170ce920f8becaa76d6c2d45 to your computer and use it in GitHub Desktop.
How long does an operation take 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
final long start = System.nanoTime(); | |
// operation being timed | |
LOGGER.trace("Operation took {} ms", (System.nanoTime() - start) / 1_000_000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment