728x90
System.currentTimeMillis( )
밀리세컨드로 나타낸 현재까지의 유닉스 시간
주로 프로그램의 구동시간을 측정할 때 사용된다.
ex)
long stratT = System.currentTimeMillis();
//// 측정할 코드 ////
long endT = System.currentTimeMillis();
System.out.println((endT - stratT) / 1000.0); //구동시간 초단위로 출력
'JAVA' 카테고리의 다른 글
객체지향 프로그래밍 (Object Oriented Programming) (0) | 2021.07.14 |
---|---|
MessageFormat (0) | 2021.07.14 |
Date / Calendar / SimpleDateFormat (0) | 2021.07.14 |
동적 가변 배열 (DynamicArray) (0) | 2021.07.13 |
배열 복사 (ArrayCopy) (0) | 2021.07.13 |