14
|
1 package jp.ac.u_ryukyu.ie.cr.tatsuki.xml;
|
|
2
|
|
3 import java.io.BufferedWriter;
|
|
4 import java.io.File;
|
|
5 import java.io.FileWriter;
|
|
6 import java.io.IOException;
|
|
7 import java.io.PrintWriter;
|
|
8 import java.util.TreeMap;
|
|
9
|
|
10
|
|
11 public class UntilTreeMapPutTime {
|
|
12
|
|
13 public static void main(String args[]) throws IOException {
|
|
14 File file = new File("./time/until");
|
|
15 PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(file)));
|
|
16 TreeMap<Integer, Integer> map = new TreeMap<Integer,Integer>();
|
|
17 for (int count = 0; count <= 48800; count++) {
|
|
18 long t1 = System.currentTimeMillis();
|
|
19 map.put(count, count);
|
|
20 long t2 = System.currentTimeMillis();
|
|
21 System.out.println("put time " + count + " " + (t2 - t1));
|
|
22 pw.println(count + " " + (t2 - t1));
|
|
23 }
|
|
24 pw.close();
|
|
25 }
|
|
26 }
|