public static void main(String[] args) { Tree drevo = new Tree(); long start = System.currentTimeMillis(); int i = 0, meja = 10000; while ( i++ < meja) { drevo.insert( (int)Math.random()*100 ); } System.out.print( (System.currentTimeMillis()-start) + " milisekund" ); }