public interface Sleeper extends TimeAuthority
| Modifier and Type | Interface and Description |
|---|---|
static class |
Sleeper.ShutdownException
Exception used to indicate that a Sleeper has been shutdown.
|
| Modifier and Type | Method and Description |
|---|---|
void |
shutdown()
Shutdown this
Sleeper. |
void |
sleepFlat(long maximumTime)
Sleep for a time based on the maximumTime parameter.
|
void |
sleepNormal(long meanTime)
Sleep for a time based on the meanTime parameter.
|
void |
sleepNormal(long meanTime,
long sigma)
Sleep for a random time drawn from a pseudo normal distribution.
|
getTimeInMillisecondsvoid shutdown()
Sleeper. Once called, all sleep method
invocations will throw Sleeper.ShutdownException,
including those already sleeping.void sleepNormal(long meanTime)
throws Sleeper.ShutdownException
meanTime - Mean time.Sleeper.ShutdownException - If this Sleeper has been shutdown.void sleepNormal(long meanTime,
long sigma)
throws Sleeper.ShutdownException
meanTime - Mean time.sigma - Standard deviation.Sleeper.ShutdownException - If this Sleeper has been shutdown.void sleepFlat(long maximumTime)
throws Sleeper.ShutdownException
maximumTime - Maximum time.Sleeper.ShutdownException - If this Sleeper has been shutdown.Copyright © 2000-2014. All Rights Reserved.