CatapultServer
v0.5.0.1 (Elephant)
|
Represents a block duration. More...
Public Member Functions | |
constexpr | BlockSpan () |
Creates a default (zero) block span. More... | |
constexpr uint64_t | hours () const |
Returns the number of hours. More... | |
constexpr uint64_t | days () const |
Returns the number of days. More... | |
BlockDuration | blocks (const TimeSpan &generationTargetTime) const |
Returns the approximate number of blocks given the generation target time (generationTargetTime). More... | |
constexpr bool | operator== (const BlockSpan &rhs) const |
Returns true if this block span is equal to rhs. More... | |
constexpr bool | operator!= (const BlockSpan &rhs) const |
Returns true if this block span is not equal to rhs. More... | |
constexpr bool | operator>= (const BlockSpan &rhs) const |
Returns true if this block span is greater than or equal to rhs. More... | |
constexpr bool | operator> (const BlockSpan &rhs) const |
Returns true if this block span is greater than rhs. More... | |
constexpr bool | operator<= (const BlockSpan &rhs) const |
Returns true if this block span is less than or equal to rhs. More... | |
constexpr bool | operator< (const BlockSpan &rhs) const |
Returns true if this block span is less than rhs. More... | |
Static Public Member Functions | |
static constexpr BlockSpan | FromHours (uint64_t hours) |
Creates a block span from the given number of hours. More... | |
static constexpr BlockSpan | FromDays (uint64_t days) |
Creates a block span from the given number of days. More... | |
Private Member Functions | |
constexpr | BlockSpan (uint64_t hours) |
Private Attributes | |
uint64_t | m_hours |
Represents a block duration.
|
inlineexplicitconstexprprivate |
|
inlineconstexpr |
Creates a default (zero) block span.
|
inline |
Returns the approximate number of blocks given the generation target time (generationTargetTime).
|
inlineconstexpr |
Returns the number of days.
|
inlinestaticconstexpr |
Creates a block span from the given number of days.
|
inlinestaticconstexpr |
Creates a block span from the given number of hours.
|
inlineconstexpr |
Returns the number of hours.
|
inlineconstexpr |
Returns true
if this block span is not equal to rhs.
|
inlineconstexpr |
Returns true
if this block span is less than rhs.
|
inlineconstexpr |
Returns true
if this block span is less than or equal to rhs.
|
inlineconstexpr |
Returns true
if this block span is equal to rhs.
|
inlineconstexpr |
Returns true
if this block span is greater than rhs.
|
inlineconstexpr |
Returns true
if this block span is greater than or equal to rhs.
|
private |