Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-17 09:41:30

0001 
0002 //          Copyright Oliver Kowalke 2013.
0003 // Distributed under the Boost Software License, Version 1.0.
0004 //    (See accompanying file LICENSE_1_0.txt or copy at
0005 //          http://www.boost.org/LICENSE_1_0.txt)
0006 
0007 #ifndef BOOST_FIBERS_DETAIL_CONVERT_H
0008 #define BOOST_FIBERS_DETAIL_CONVERT_H
0009 
0010 #include <chrono>
0011 #include <memory>
0012 
0013 #include <boost/config.hpp>
0014 
0015 #include <boost/fiber/detail/config.hpp>
0016 
0017 #ifdef BOOST_HAS_ABI_HEADERS
0018 #  include BOOST_ABI_PREFIX
0019 #endif
0020 
0021 namespace boost {
0022 namespace fibers {
0023 namespace detail {
0024 
0025 inline
0026 std::chrono::steady_clock::time_point convert(
0027         std::chrono::steady_clock::time_point const& timeout_time) noexcept {
0028     return timeout_time;
0029 }
0030 
0031 template< typename Clock, typename Duration >
0032 std::chrono::steady_clock::time_point convert(
0033         std::chrono::time_point< Clock, Duration > const& timeout_time) {
0034     return std::chrono::steady_clock::now() + ( timeout_time - Clock::now() );
0035 }
0036 
0037 }}}
0038 
0039 #ifdef BOOST_HAS_ABI_HEADERS
0040 #  include BOOST_ABI_SUFFIX
0041 #endif
0042 
0043 #endif // BOOST_FIBERS_DETAIL_CONVERT_H