public class Deadline
extends java.lang.Object
| Constructor and Description |
|---|
Deadline(java.math.BigInteger input)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
static Deadline |
create(java.time.Duration epochAdjustment)
Create the default deadline of 2 hours.
|
static Deadline |
create(java.time.Duration epochAdjustment,
int units,
java.time.temporal.ChronoUnit chronoUnit)
Create deadline model.
|
java.time.Instant |
getInstant(java.time.Duration epochAdjustment)
Returns the value as instant
|
java.time.LocalDateTime |
getLocalDateTime(java.time.Duration epochAdjustment)
Returns deadline as local date time.
|
java.time.LocalDateTime |
getLocalDateTime(java.time.Duration epochAdjustment,
java.time.ZoneId zoneId)
Returns deadline as local date time in a given timezone.
|
long |
getValue()
Returns number of seconds elapsed since the creation of the nemesis block in milliseconds.
|
java.math.BigInteger |
toBigInteger() |
public Deadline(java.math.BigInteger input)
input - Deadline in BigInteger formatpublic static Deadline create(java.time.Duration epochAdjustment, int units, java.time.temporal.ChronoUnit chronoUnit)
epochAdjustment - the network's epoch adjustment. Defined in the network/properties.units - intchronoUnit - Chrono unitDeadlinepublic static Deadline create(java.time.Duration epochAdjustment)
epochAdjustment - the network's epoch adjustment. Defined in the network/properties.Deadlinepublic java.math.BigInteger toBigInteger()
public long getValue()
public java.time.Instant getInstant(java.time.Duration epochAdjustment)
epochAdjustment - the network's epoch adjustment. Defined in the network/properties.public java.time.LocalDateTime getLocalDateTime(java.time.Duration epochAdjustment,
java.time.ZoneId zoneId)
epochAdjustment - the network's epoch adjustment. Defined in the network/properties.zoneId - Timezonepublic java.time.LocalDateTime getLocalDateTime(java.time.Duration epochAdjustment)
epochAdjustment - the network's epoch adjustment. Defined in the network/properties.