Skip to content

Instantly share code, notes, and snippets.

@metebalci
Created January 26, 2017 08:38
Show Gist options
  • Save metebalci/b78f5becee50d5ef84bc7afec2aa8dbd to your computer and use it in GitHub Desktop.
Save metebalci/b78f5becee50d5ef84bc7afec2aa8dbd to your computer and use it in GitHub Desktop.
public class Test {
public int f() throws Exception {
int a = 5;
return a;
}
public static void main(String[] args) throws Exception {
for (int i = 1; i <= 10; i++) {
System.out.println("call " + Integer.valueOf(i));
long a = System.nanoTime();
new Test().f();
long b = System.nanoTime();
System.out.println("elapsed= " + (b-a));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment