BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslmt::SaturatedTimeConversionImpUtil Struct Reference

#include <bslmt_saturatedtimeconversionimputil.h>

Classes

struct  TimeSpec
 Provide type for Windows platform. More...
 

Static Public Member Functions

static void toTimeSpec (TimeSpec *dst, const bsls::TimeInterval &src)
 
static void toTimeT (bsl::time_t *dst, const bsls::Types::Int64 src)
 
static void toMillisec (unsigned int *dst, const bsls::TimeInterval &src)
 
static void toMillisec (unsigned long *dst, const bsls::TimeInterval &src)
 
static void toMillisec (bsls::Types::Uint64 *dst, const bsls::TimeInterval &src)
 

Detailed 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).

Member Function Documentation

◆ toMillisec() [1/3]

static void bslmt::SaturatedTimeConversionImpUtil::toMillisec ( bsls::Types::Uint64 dst,
const bsls::TimeInterval src 
)
static

Assign to the specified dst the value of the specified src converted to milliseconds, and if that value is a negative time interval, set dst to 0, and if that value is greater than the maximum representable value of dst set dst to its maximum representable value. See {Conversion to Milliseconds}.

◆ toMillisec() [2/3]

static void bslmt::SaturatedTimeConversionImpUtil::toMillisec ( unsigned int *  dst,
const bsls::TimeInterval src 
)
static

◆ toMillisec() [3/3]

static void bslmt::SaturatedTimeConversionImpUtil::toMillisec ( unsigned long *  dst,
const bsls::TimeInterval src 
)
static

◆ toTimeSpec()

static void bslmt::SaturatedTimeConversionImpUtil::toTimeSpec ( TimeSpec dst,
const bsls::TimeInterval src 
)
static

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.

◆ toTimeT()

static void bslmt::SaturatedTimeConversionImpUtil::toTimeT ( bsl::time_t *  dst,
const bsls::Types::Int64  src 
)
static

Assign to the specified dst the value of the specified src, and if src is less than the lowest representable time_t value, set dst to the minimum time_t value, and if src is greater than the highest representable time_t value, set dst to the maximum time_t value.


The documentation for this struct was generated from the following file: