1package com.tutorialspoint;
2
3import java.lang.*;
4
5public class SystemDemo {
6
7 public static void main(String[] args) {
8
9 // returns the current value of the system timer, in nanoseconds
10 System.out.print("time in nanoseconds = ");
11 System.out.println(System.nanoTime());
12
13 // returns the current value of the system timer, in milliseconds
14 System.out.print("time in milliseconds = ");
15 System.out.println(System.currentTimeMillis());
16 }
17}