Check out example codes for "get current system time in nanoseconds java". It will help you in understanding the concepts better.

Code Example 1

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());
   }
}

Learn ReactJs, React Native from akashmittal.com