io.leopard.timer
Class PerDayPeriod

java.lang.Object
  extended by io.leopard.timer.PerDayPeriod
All Implemented Interfaces:
Period

public class PerDayPeriod
extends java.lang.Object
implements Period

周期(每天)

Author:
阿海

Field Summary
protected  org.apache.commons.logging.Log logger
           
 
Constructor Summary
PerDayPeriod(int hour, int minute)
          构造周期 .
PerDayPeriod(int hour, int minute, int second)
           
 
Method Summary
 int getSeconds()
          返回与指定时间点相差的秒数 .
 boolean sleep()
          睡眠到周期到了 .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Constructor Detail

PerDayPeriod

public PerDayPeriod(int hour,
                    int minute)
构造周期 .

Parameters:
hour - 小时
minute - 分钟

PerDayPeriod

public PerDayPeriod(int hour,
                    int minute,
                    int second)
Method Detail

getSeconds

public int getSeconds()
返回与指定时间点相差的秒数 .

Returns:

sleep

public boolean sleep()
              throws java.lang.InterruptedException
Description copied from interface: Period
睡眠到周期到了 .

Specified by:
sleep in interface Period
Returns:
是否还继续下一次.
Throws:
java.lang.InterruptedException


Copyright © 2014. All Rights Reserved.