X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=test%2FTest.java;fp=test%2FTest.java;h=40338d7c0603808aac4a425c58b31289fe269ee3;hb=dfc10c016c5f1bb4b7714dff414562f2f32e2866;hp=0000000000000000000000000000000000000000;hpb=84086eec3f20c7af0c4817548de4e8296c7674f8;p=debian%2Fopenrocket diff --git a/test/Test.java b/test/Test.java new file mode 100644 index 00000000..40338d7c --- /dev/null +++ b/test/Test.java @@ -0,0 +1,32 @@ +import net.sf.openrocket.util.Coordinate; + + +public class Test { + + public static int COUNT = 10000000; + + public static void main(String[] args) { + + for (int i=1; ; i++) { + long t1 = System.currentTimeMillis(); + run(); + long t2 = System.currentTimeMillis(); + System.out.println("Run " + i + " took " + (t2-t1) + " ms"); + } + + } + + + private static void run() { + Coordinate a = new Coordinate(1,1,1,1); + Coordinate b = new Coordinate(1,1,1,1); + + for (int i=0; i < COUNT; i++) { + a = a.add(b); + } + System.out.println("value:"+a); + + return; + } + +}