Warning, file /include/boost/chrono/floor.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_CHRONO_FLOOR_HPP
0012 #define BOOST_CHRONO_FLOOR_HPP
0013
0014 #include <boost/chrono/duration.hpp>
0015
0016 namespace boost
0017 {
0018 namespace chrono
0019 {
0020
0021
0022
0023
0024 template <class To, class Rep, class Period>
0025 To floor(const duration<Rep, Period>& d)
0026 {
0027 To t = duration_cast<To>(d);
0028 if (t>d) --t;
0029 return t;
0030 }
0031
0032
0033 }
0034 }
0035
0036 #endif