net.tomp2p.utils
Class TimingImpl
java.lang.Object
net.tomp2p.utils.TimingImpl
- All Implemented Interfaces:
- Timing
public class TimingImpl
- extends Object
- implements Timing
The implementation that is used for normal operation. This class uses System.currentTimeMillis() and Thread.sleep().
- Author:
- Thomas Bocek
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimingImpl
public TimingImpl()
currentTimeMillis
public long currentTimeMillis()
- Specified by:
currentTimeMillis in interface Timing
- Returns:
- the time in millis for this system
sleep
public void sleep(int millis)
throws InterruptedException
- Description copied from interface:
Timing
- Sleeps with throwing an InterruptedException
- Specified by:
sleep in interface Timing
- Parameters:
millis - The time to sleep in milliseconds
- Throws:
InterruptedException - If interrputed is called
sleepUninterruptibly
public void sleepUninterruptibly(int millis)
- Description copied from interface:
Timing
- Sleeps without throwing an InterruptedException
- Specified by:
sleepUninterruptibly in interface Timing
- Parameters:
millis - The time to sleep in milliseconds
Copyright © 2013. All Rights Reserved.