• 프로그램 수행 시간 계산
  • [레벨:18]Zappy (IP: *.114.147.162)
    조회 수: 11151, 2010-05-11 10:20:49(2010-05-11)
  • long start = System.currentTimeMillis();

    int n = 0;


    for (int i = 0; i < 100000000; i++) {
        n = n + i;
    }



    System.out.println("경과 시간 : " + (System.currentTimeMillis() - start)/1000.0 + " seconds");

댓글 0

번호 제목 닉네임 조회  등록일 
3 [레벨:18]Zappy 5071 2010-05-11
2 [레벨:18]Zappy 7610 2010-05-11
[레벨:18]Zappy 11151 2010-05-11
XE Login