io.leopard.timer
Class MilliSecondPeriod

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

public class MilliSecondPeriod
extends java.lang.Object
implements Period

周期毫秒.

Author:
阿海

Constructor Summary
MilliSecondPeriod(long milliSecond)
          构造周期 .
 
Method Summary
 long getMilliSecond()
           
 boolean sleep()
          睡眠到周期到了 .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MilliSecondPeriod

public MilliSecondPeriod(long milliSecond)
构造周期 .

Parameters:
second - 秒
Method Detail

getMilliSecond

public long getMilliSecond()

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.