BloombergLP::bslmt::SaturatedTimeConversionImpUtil::toTimeSpec

Assign src to *dst, saturating to the representable range.

Synopsis

Declared in <bslmt_saturatedtimeconversionimputil.h>

static
void
toTimeSpec(
    TimeSpec* dst,
    bsls::TimeInterval const& src);

Description

Assign to the specified dst the value of the specified src, and if src is less than the lowest representable value of *dst, set *dst to the minimum value it can represent, and if src is greater than the highest representable value of *dst, set *dst to the maximum value that it can represent.

Parameters

NameDescription
dstdestination time specification to assign
srcsource time interval to convert