Ticket #6361: 6361.patch

File 6361.patch, 977 bytes (added by viboes, 11 years ago)
  • process_cpu_clocks.hpp

     
    3434    {
    3535      BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
    3636    }
     37    typedef ratio_divide<giga, ratio<CLOCKS_PER_SEC>>::type R;
    3738    return time_point(
    38       duration(c*(1000000000l/CLOCKS_PER_SEC))
     39      duration(static_cast<rep>(c)*R::num/R::den)
    3940    );
     41//    return time_point(
     42//      duration(c*(1000000000l/CLOCKS_PER_SEC))
     43//    );
    4044}
    4145
    4246#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
     
    5660    {
    5761      ec.clear();
    5862    }
     63    typedef ratio_divide<giga, ratio<CLOCKS_PER_SEC>>::type R;
    5964    return time_point(
    60       duration(c*(1000000000l/CLOCKS_PER_SEC))
     65      duration(static_cast<rep>(c)*R::num/R::den)
    6166    );
     67//    return time_point(
     68//      duration(c*(1000000000l/CLOCKS_PER_SEC))
     69//    );
    6270}
    6371#endif
    6472