1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
8 using cmDuration
= std::chrono::duration
<double, std::ratio
<1>>;
11 * This function will return number of seconds in the requested type T.
13 * A duration_cast from duration<double> to duration<T> will not yield what
14 * one might expect if the double representation does not fit into type T.
15 * This function aims to safely convert, by clamping the double value between
16 * the permissible valid values for T.
19 T
cmDurationTo(const cmDuration
& duration
);
21 #ifndef CMDURATION_CPP
22 extern template int cmDurationTo
<int>(const cmDuration
&);
23 extern template unsigned int cmDurationTo
<unsigned int>(const cmDuration
&);