- LARGE_INTEGER freq;
- if (QueryPerformanceFrequency(&freq) == 0) {
- DEBUG_TIMING ("Failed to determine frequency of QPC\n");
- qpc_frequency_success() = false;
- } else {
- qpc_frequency_success() = true;
+ int64_t last_timer_val = PBD::QPC::get_microseconds ();
+ if (last_timer_val < 0) return false;
+
+ for (int i = 0; i < 100000; ++i) {
+ int64_t timer_val = PBD::QPC::get_microseconds ();
+ if (timer_val < 0) return false;
+ // try and test for non-syncronized TSC(AMD K8/etc)
+ if (timer_val < last_timer_val) return false;
+ last_timer_val = timer_val;