Package | Description |
---|---|
com.peterphi.std.threading | |
com.peterphi.std.util |
Modifier and Type | Field | Description |
---|---|---|
static Timeout |
Timeout.FIVE_MINUTES |
Five minutes
|
static Timeout |
Timeout.MAX_VALUE |
The maximum possible timeout
|
static Timeout |
Timeout.ONE_MINUTE |
One minute
|
static Timeout |
Timeout.ONE_QUARTER_SECOND |
0.25 seconds (250 milliseconds)
|
static Timeout |
Timeout.ONE_SECOND |
One second
|
static Timeout |
Timeout.TEN_SECONDS |
Ten seconds
|
static Timeout |
Timeout.THIRTY_MINUTES |
30 minutes
|
static Timeout |
Timeout.THIRTY_SECONDS |
Thirty seconds
|
static Timeout |
Timeout.ZERO |
A zero-length timeout
|
Modifier and Type | Method | Description |
---|---|---|
Timeout |
Deadline.getTimeoutLeft() |
Determines the amount of time leftuntil the deadline and returns it as a timeout
|
static Timeout |
Timeout.max(Timeout... timeouts) |
Filter through a number of timeouts to find the one with the longest period
|
static Timeout |
Timeout.min(Timeout... timeouts) |
Filter through a number of timeouts to find the one with the shortest period
|
Timeout |
Timeout.multiply(double by) |
Create a new Timeout which is equal to this timeout multiplied by some value
The resulting Timeout will be in milliseconds to maximise precision. |
Timeout |
Timeout.multiply(long by) |
Create a new Timeout which is equal to this timeout multiplied by some value
|
static Timeout |
Timeout.sum(Timeout... timeouts) |
Adds together all the supplied timeouts
|
Modifier and Type | Method | Description |
---|---|---|
int |
Timeout.compareTo(Timeout that) |
|
static Timeout |
Timeout.max(Timeout... timeouts) |
Filter through a number of timeouts to find the one with the longest period
|
static Timeout |
Timeout.min(Timeout... timeouts) |
Filter through a number of timeouts to find the one with the shortest period
|
static Timeout |
Timeout.sum(Timeout... timeouts) |
Adds together all the supplied timeouts
|
Constructor | Description |
---|---|
Deadline(Timeout timeout) |
Constructs a new deadline based on adding
timeout to the current timeIf current time + timeout > Long.MAX_VALUE then Long.MAX_VALUE is used as the deadline |
Modifier and Type | Method | Description |
---|---|---|
Timeout |
Ticker.getElapsedTime() |
Copyright © 2018. All rights reserved.