1
2package com.journaldev.threads;
3
4public class ThreadSleep {
5
6 public static void main(String[] args) throws InterruptedException {
7 long start = System.currentTimeMillis();
8 Thread.sleep(2000);
9 System.out.println("Sleep time in ms = "+(System.currentTimeMillis()-start));
10
11 }
12
13}
14