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);

Return whether seconds and nanoseconds form a valid interval.

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

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

Name

Description

duration

chrono duration to validate

seconds

whole seconds component

nanoseconds

nanoseconds component

Created with MrDocs