import java.util.concurrent.*; import java.util.*; import easyIO.*; // enklest mulig modell-kode for parallellitet, // se Model2.java for tidtaking mm class Tider2017 { Out ut; int n; void println(String s){ System.out.println(s); ut.outln(s); } // felles data og metoder A public static void main(String [] args) { if ( args.length != 3) { System.out.println("use: >java Tider2017 "); } else { Tider2017 p = new Tider2017(); p.utfoer(args); } } int neste(int i){ return i+1; } void utfoer (String [] args) { n = Integer.parseInt(args[0]); int aLen = Integer.parseInt(args[1]); ut = new Out(args[2],true); // Open with append int k=0; long t; double d,f1,f2; String s; int [] ia,ib; Thread t1; double [] db, db2; Random r; class C { int i;C(int i){ this.i =i;} int les () { return i+10;} } // end C class D { int i;D(int i){ this.i =i;} int les () { return i+11;} } // end D println("\nFra tidene for mange ganger eksekvering trekkes tiden\nfor like mange ganger for-loop\n"); //for-loop s ="for-loop"; k =1; t = System.nanoTime(); for (int i = 0; i<1; i++) { //k=0; } f1= d = (double) ((System.nanoTime() -t)/1000.0); println(s+Format.align(d,12,4)+"us. forste gang"); t = System.nanoTime(); for (int i = 0; i= left && a[i] > t) { a[i+1] = a[i]; i--; } a[i+1] = t; } } // end insertSort1 } // end class Tider2017