package com.sunsoft.redyin.javacore130_02;

import java.text.SimpleDateFormat;
import java.util.Date;

public class TestSleep {
	public static void main(String[] args) {
		SleepThread thread = new SleepThread();
		thread.start();
	}
}
class SleepThread extends Thread {
	public void run() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyyÄêMMÔÂddÈÕ HH:mm:ss:SSSS");
		while (true) {
			System.out.println(sdf.format(new Date()));
			try {
				Thread.sleep(100);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}
}