Utility for saturating conversions between time representations.

Synopsis

Declared in <bslmt_saturatedtimeconversionimputil.h>

struct SaturatedTimeConversionImpUtil;

Description

This struct provides a namespace for utility functions that convert time values between different time representations, and "saturate" when values are outside the range of values that may be represented in the destination type (meaning that values above the maximum representable value of the result type are set to the maximum value of the result type, and values below the minimum representable value of the result type are set to the minimum value for the result type).

Type Aliases

Name

Description

TimeSpec

Alias to the platform timespec type.

Static Member Functions

Name

Description

toMillisec

Convert src to milliseconds with saturation.

toTimeSpec

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

toTimeT

Assign src to *dst as a time_t, saturating to range.

Created with MrDocs