-
-
Notifications
You must be signed in to change notification settings - Fork 938
Expand file tree
/
Copy pathOverloadedTest.java
More file actions
27 lines (25 loc) · 747 Bytes
/
OverloadedTest.java
File metadata and controls
27 lines (25 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.jruby.test;
/**
*
* @author headius
*/
public class OverloadedTest {
public static void testOverloaded(Overloaded o, int loops) {
long time = System.currentTimeMillis();
for (int i = 0; i < loops; i++) {
o.getName("Charlie");
}
System.out.println("took: " + (System.currentTimeMillis() - time));
}
public static void testOverloaded2(Overloaded o, int loops) {
long time = System.currentTimeMillis();
for (int i = 0; i < loops; i++) {
o.foo("Charlie");
}
System.out.println("took: " + (System.currentTimeMillis() - time));
}
}