Ticket #7042: 7042.2.patch

File 7042.2.patch, 1.6 KB (added by viboes, 10 years ago)
  • system_clocks.hpp

     
    3131TODO:
    3232
    3333  * Fully implement error handling, with test cases.
    34   * Use boost::throw_exception. (Currently not used because of an issue with Intel 11.0.)
    3534  * Consider issues raised by Michael Marcin:
    3635
    3736    > In the past I've seen QueryPerformanceCounter give incorrect results,
     
    7069
    7170#include <ctime>
    7271
     72# if defined( BOOST_CHRONO_POSIX_API )
     73#   if ! defined(CLOCK_REALTIME)
     74#     error <time.h> does not supply CLOCK_REALTIME
     75#   endif
     76# endif
     77
    7378#ifdef BOOST_CHRONO_WINDOWS_API
    7479// The system_clock tick is 100 nanoseconds
    7580# define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::duration<boost::int_least64_t, ratio<BOOST_RATIO_INTMAX_C(1), BOOST_RATIO_INTMAX_C(10000000)> >
  • config.hpp

     
    7070# if defined( BOOST_CHRONO_POSIX_API )
    7171#   define BOOST_CHRONO_HAS_PROCESS_CLOCKS
    7272#   include <time.h>  //to check for CLOCK_REALTIME and CLOCK_MONOTONIC and _POSIX_THREAD_CPUTIME
    73 #   if defined(CLOCK_REALTIME)
    74 #     if defined(CLOCK_MONOTONIC)
    75 #        define BOOST_CHRONO_HAS_CLOCK_STEADY
    76 #     endif
    77 #   else
    78 #     error <time.h> does not supply CLOCK_REALTIME
     73#   if defined(CLOCK_MONOTONIC)
     74#      define BOOST_CHRONO_HAS_CLOCK_STEADY
    7975#   endif
    8076#   if defined(_POSIX_THREAD_CPUTIME) && !defined(BOOST_DISABLE_THREADS)
    8177#     define BOOST_CHRONO_HAS_THREAD_CLOCK