Set this interval from floating-point seconds if the result is valid.
Declared in <bdlt_datetimeinterval.h>
int
setTotalSecondsFromDoubleIfValid(double seconds);
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. Return 0 if the resulting time interval value is valid (i.e., the days field must not overflow an int) and a non-zero value (with no effect) otherwise.
0 on success, and a non-zero value (with no effect) otherwise
| Name | Description |
|---|---|
| seconds | total seconds, possibly fractional |