Answers for "get current system time in nanoseconds java"

0

get current system time in nanoseconds java

package com.tutorialspoint;

import java.lang.*;

public class SystemDemo {

   public static void main(String[] args) {

      // returns the current value of the system timer, in nanoseconds
      System.out.print("time in nanoseconds = ");
      System.out.println(System.nanoTime());

      // returns the current value of the system timer, in milliseconds
      System.out.print("time in milliseconds = ");
      System.out.println(System.currentTimeMillis());
   }
}
Posted by: Guest on August-14-2020

Code answers related to "get current system time in nanoseconds java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language