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

Utility for saturating conversions between time representations&period;

== Synopsis

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

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

== Description

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;

== 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`] 
| Convert `src` to milliseconds with saturation&period;
| xref:BloombergLP/bslmt/SaturatedTimeConversionImpUtil/toTimeSpec.adoc[`toTimeSpec`] 
| Assign `src` to `&ast;dst`, saturating to the representable range&period;
| xref:BloombergLP/bslmt/SaturatedTimeConversionImpUtil/toTimeT.adoc[`toTimeT`] 
| Assign `src` to `&ast;dst` as a `time&lowbar;t`, saturating to range&period;
|===



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