Skip to content

Instantly share code, notes, and snippets.

@buchgr
Created April 25, 2015 01:14
Show Gist options
  • Save buchgr/ca777e3cd3c7d6820f99 to your computer and use it in GitHub Desktop.
Save buchgr/ca777e3cd3c7d6820f99 to your computer and use it in GitHub Desktop.
long start = System.nanoTime();
int i = 0;
while (i < 10000) {
LockSupport.parkNanos(1);
i++;
}
long end = System.nanoTime();
System.out.println((end - start) / 10000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment