26 #include <type_traits>
31 #ifdef FLOW123D_HAVE_TIMER_QUERY_PERFORMANCE_COUNTER
35 #endif //FLOW123D_HAVE_TIMER_CHRONO_HIGH_RESOLUTION
40 #ifdef FLOW123D_HAVE_TIMER_QUERY_PERFORMANCE_COUNTER
46 QueryPerformanceCounter (&time);
47 this->ticks = time.QuadPart;
52 LARGE_INTEGER TimePoint::get_frequency () {
53 LARGE_INTEGER frequency;
54 QueryPerformanceFrequency(&frequency);
57 LARGE_INTEGER TimePoint::frequency = TimePoint::get_frequency ();
61 double difference = this->ticks -
right.ticks;
62 return difference / (TimePoint::frequency.QuadPart);
72 chrono::time_point<chrono::high_resolution_clock> time = chrono::high_resolution_clock::now ();
73 this->ticks = chrono::duration_cast<std::chrono::nanoseconds> (time.time_since_epoch ()).count ();
78 double difference = this->ticks -
right.ticks;
79 return difference / (1 * 1000 * 1000 * 1000);
82 #endif //FLOW123D_HAVE_TIMER_CHRONO_HIGH_RESOLUTION