BloombergLP::bdlt::DatetimeInterval::setTotalSecondsFromDouble

Set this interval from a floating-point total of seconds.

Synopsis

Declared in <bdlt_datetimeinterval.h>

void
setTotalSecondsFromDouble(double seconds);

Description

Set the overall value of this object to indicate the specified number of seconds. The fractional part of seconds, if any, is rounded to the nearest whole number of microseconds. The behavior is undefined unless the resulting time interval value is valid (i.e., the days field must not overflow a 32-bit integer).

Parameters

NameDescription
secondstotal seconds, possibly fractional