Skip to content

Instantly share code, notes, and snippets.

@h4ck4life
Created November 1, 2013 01:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save h4ck4life/7259621 to your computer and use it in GitHub Desktop.
Save h4ck4life/7259621 to your computer and use it in GitHub Desktop.
Java Code Execution Time Calculation
long start = System.nanoTime();
// do work.....
long time = System.nanoTime() - start;
double timeInSeconds = time/1e9;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment