Newer
Older
NWP / src / run1-1.sh
@20a5101 20a5101 on 4 Oct 2021 491 bytes Update run1-1.sh
public class Main {
  public static void main(String[] args) {
  
  // 処理前の時刻
  long startTime = System.currentTimeMillis();
  
  int result = 0;
  for (int i = 0; i i < 1000000; i++){
      result += 1;
  }
  
  // 処理後の時刻
  long endTime = System.currentTieMillis();
  
  System.out.println("開始時刻 :" +startTime + " ms");
  System.out.println("終了時刻 :" + endTime + " ms");
  System.out.println("処理時間 :" + (endTime - startTime) + " ms");
  }
}