BloombergLP::bsls::TimeInterval::isValid

isValid overloads

Synopses

Declared in <bsls_timeinterval.h>

Return whether duration can form a valid TimeInterval.

template<
    class REP,
    class PERIOD>
static
bool
isValid(std::chrono::duration<REP, PERIOD> const& duration);
» more...

Return whether seconds and nanoseconds form a valid interval.

constexpr
static
bool
isValid(
    bsls::Types::Int64 seconds,
    int nanoseconds);
» more...

Return Value

  • true if a TimeInterval can be constructed from duration; false otherwise
  • true if a TimeInterval can be constructed from the arguments; false otherwise

Parameters

NameDescription
durationchrono duration to validate
secondswhole seconds component
nanosecondsnanoseconds component