|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
java.lang.Object | +--java.util.TimerTask
Timer ¿¡ ÀÇÇØ 1 ȸ ¶Ç´Â ¹Ýº¹ÇØ ½ÇÇàÇϵµ·Ï(µíÀÌ) ½ºÄÉÁÙ µÇ´Â ŽºÅ©ÀÔ´Ï´Ù.
Timer
»ý¼ºÀÚÀÇ °³¿ä | |
protected |
TimerTask ()
»õ·Î¿î ŸÀÌ¸Ó Å½ºÅ©°¡ ÀÛ¼ºµË´Ï´Ù. |
¸Þ¼ÒµåÀÇ °³¿ä | |
boolean |
cancel ()
ÀÌ Å¸ÀÌ¸Ó Å½ºÅ©¸¦ Ãë¼ÒÇÕ´Ï´Ù. |
abstract void |
run ()
ÀÌ Å¸ÀÌ¸Ó Å½ºÅ©¿¡ ÀÇÇØ ½ÇÇàµÇ´Â ¾×¼ÇÀÔ´Ï´Ù. |
long |
scheduledExecutionTime ()
ÀÌ Å½ºÅ©¸¦ ÃÖ±Ù ¡¸½ÇÁ¦·Î¡¹½ÇÇàÇϵµ·Ï(µíÀÌ) ¡¸½ºÄÉÁÙ µÇ¾ú´Ù¡¹½ÇÇà ½Ã°£À» µ¹·ÁÁÝ´Ï´Ù (ÀÌ ¸Þ¼Òµå°¡ ŽºÅ©ÀÇ ½ÇÇàÁß¿¡ ºÒ·Á °¬À» °æ¿ì, ¹Ýȯ°ªÀº ÁøÇàÁßÀÇ Å½ºÅ© ½ÇÇàÀÇ ½ºÄÉÁÙ µÈ ½ÇÇà ½Ã°£ÀÌ µË´Ï´Ù). |
Ŭ·¡½º java.lang. Object ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
»ý¼ºÀÚÀÇ »ó¼¼ |
protected TimerTask()
¸Þ¼ÒµåÀÇ »ó¼¼ |
public abstract void run()
Runnable
³»ÀÇ run
Thread.run()
public boolean cancel()
¹Ýº¹ ŸÀÌ¸Ó Å½ºÅ©ÀÇ run ¸Þ¼Òµå·ÎºÎÅÍ ÀÌ ¸Þ¼Òµå¸¦ È£ÃâÇϸé(ÀÚ), ŸÀÌ¸Ó Å½ºÅ©´Â µÎ ¹ø ´Ù½Ã ½ÇÇàµÇÁö ¾Ê°Ô µË´Ï´Ù.
ÀÌ ¸Þ¼Òµå´Â ¹Ýº¹ÇØ ºÒ·Á °©´Ï´Ù. 2 ¹øÂ° ÀÌÈÄÀÇ È£Ãâ¿¡´Â È¿°ú´Â ¾ø½À´Ï´Ù.
public long scheduledExecutionTime()
ÀÌ ¸Þ¼Òµå´Â Åë»ó, ŽºÅ©ÀÇ ½ÇÇà ¸Þ¼Òµå·ÎºÎÅÍ ºÒ·Á °¡ ÇöÀçÀÇ Å½ºÅ©°¡, ½ºÄÉÁÙ´ë·Î ÀÛ¾÷ÀÌ ½ÇÇàµÇ°í ÀÖÀ»±î¸¦ ÆÇ´ÜÇÕ´Ï´Ù.
public void run() { if (System.currentTimeMillis() - scheduledExecutionTime() >= MAX_TARDINESS) return; // Too late; skip this execution. // Perform the task }ÀÌ ¸Þ¼Òµå´Â Åë»ó, ¡¸°íÁ¤ Áö¿¬ ½ÇÇࡹÀÇ ¹Ýº¹ ŽºÅ©¿Í ÇÔ²² »ç¿ëµÉ °ÍÀº ¾ø½À´Ï´Ù. ¡¸°íÁ¤ Áö¿¬ ½ÇÇࡹÀÇ ¹Ýº¹ ŽºÅ©¿¡¼´Â ½ºÄÉÁÙ µÈ ½ÇÇà ½Ã°£Àº ´ÊÃß´Â °ÍÀÌ °¡´ÉÇϰí, ±×¸¸Å Áß¿äÇÏÁö ¾Ê±â ¶§¹®ÀÔ´Ï´Ù.
Date.getTime()
|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
Java, Java 2 D, ¹× JDBC ´Â ¹Ì±¹ ¹× ±× ¿ÜÀÇ ³ª¶ó¿¡ ÀÖ¾î¼ÀÇ ¹Ì±¹ Sun Microsystems, Inc. ÀÇ »óÇ¥ ȤÀº µî·Ï»óÇ¥ÀÔ´Ï´Ù.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.