[#BloombergLP-bslmt-SaturatedTimeConversionImpUtil]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::SaturatedTimeConversionImpUtil
:relfileprefix: ../../
:mrdocs:

This `struct` provides a namespace for utility functions that convert time values between different time representations, and &quot;saturate&quot; 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)&period;

== Synopsis

Declared in `&lt;bslmt&lowbar;saturatedtimeconversionimputil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct SaturatedTimeConversionImpUtil;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmt/SaturatedTimeConversionImpUtil/TimeSpec.adoc[`TimeSpec`] 
| Alias to the platform `timespec` type&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmt/SaturatedTimeConversionImpUtil/toMillisec-029.adoc[`toMillisec`] 
| 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&period; See &lcub;Conversion to Milliseconds&rcub;&period;
| xref:BloombergLP/bslmt/SaturatedTimeConversionImpUtil/toTimeSpec.adoc[`toTimeSpec`] 
| Assign to the specified `dst` the value of the specified `src`, and if `src` is less than the lowest representable value of `&ast;dst`, set `&ast;dst` to the minimum value it can represent, and if `src` is greater than the highest representable value of `&ast;dst`, set `&ast;dst` to the maximum value that it can represent&period;
| xref:BloombergLP/bslmt/SaturatedTimeConversionImpUtil/toTimeT.adoc[`toTimeT`] 
| Assign to the specified `dst` the value of the specified `src`, and if `src` is less than the lowest representable `time&lowbar;t` value, set `dst` to the minimum `time&lowbar;t` value, and if `src` is greater than the highest representable `time&lowbar;t` value, set `dst` to the maximum `time&lowbar;t` value&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
