Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiftb0y committed Aug 21, 2023
1 parent 77b0fd9 commit abea607
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/test/performancetimer_test.cpp
Expand Up @@ -23,6 +23,8 @@ TEST(PerformanceTimerTest, DifferenceCanBeNegative) {
late.start();
mixxx::Duration difference = early.difference(late);

qWarning() << early.elapsed() << late.elapsed() << difference;

// If the high-res clock hasn't ticked yet, the difference should be 0.
// If it has ticked, then the difference better be negative.
ASSERT_LE(difference.toIntegerNanos(), 0);
Expand Down
4 changes: 2 additions & 2 deletions src/util/performancetimer.h
Expand Up @@ -28,9 +28,9 @@ class PerformanceTimer {
m_elapsedTimer.restart();
return elapsedNs;
}

// only provides milliseconds resolution, Qt (possibly API) limitation
mixxx::Duration difference(const PerformanceTimer& timer) const {
return timer.elapsed() - elapsed();
return mixxx::Duration::fromMillis(timer.msecsTo(m_elapsedTimer));

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / Ubuntu 22.04 (Qt 6.2, gcc)

‘const class PerformanceTimer’ has no member named ‘msecsTo’

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / Ubuntu 22.04 (gcc)

‘const class PerformanceTimer’ has no member named ‘msecsTo’

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / Windows 2019 (MSVC)

'msecsTo': is not a member of 'PerformanceTimer'

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clazy

no member named 'msecsTo' in 'PerformanceTimer'

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clazy

no member named 'msecsTo' in 'PerformanceTimer'

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clazy

no member named 'msecsTo' in 'PerformanceTimer'

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clazy

no member named 'msecsTo' in 'PerformanceTimer'

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clazy

no member named 'msecsTo' in 'PerformanceTimer'

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clazy

no member named 'msecsTo' in 'PerformanceTimer'

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clazy

no member named 'msecsTo' in 'PerformanceTimer'

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clazy

no member named 'msecsTo' in 'PerformanceTimer'

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clazy

no member named 'msecsTo' in 'PerformanceTimer'

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clazy

no member named 'msecsTo' in 'PerformanceTimer'

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / coverage

‘const class PerformanceTimer’ has no member named ‘msecsTo’

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / coverage

‘const class PerformanceTimer’ has no member named ‘msecsTo’

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / coverage

‘const class PerformanceTimer’ has no member named ‘msecsTo’

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / coverage

‘const class PerformanceTimer’ has no member named ‘msecsTo’

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / coverage

‘const class PerformanceTimer’ has no member named ‘msecsTo’

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / coverage

‘const class PerformanceTimer’ has no member named ‘msecsTo’

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / coverage

‘const class PerformanceTimer’ has no member named ‘msecsTo’

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / coverage

‘const class PerformanceTimer’ has no member named ‘msecsTo’

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / coverage

‘const class PerformanceTimer’ has no member named ‘msecsTo’

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / coverage

‘const class PerformanceTimer’ has no member named ‘msecsTo’

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clang-tidy

no member named 'msecsTo' in 'PerformanceTimer' [clang-diagnostic-error]

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clang-tidy

no member named 'msecsTo' in 'PerformanceTimer' [clang-diagnostic-error]

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clang-tidy

no member named 'msecsTo' in 'PerformanceTimer' [clang-diagnostic-error]

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clang-tidy

no member named 'msecsTo' in 'PerformanceTimer' [clang-diagnostic-error]

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clang-tidy

no member named 'msecsTo' in 'PerformanceTimer' [clang-diagnostic-error]

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clang-tidy

no member named 'msecsTo' in 'PerformanceTimer' [clang-diagnostic-error]

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clang-tidy

no member named 'msecsTo' in 'PerformanceTimer' [clang-diagnostic-error]

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clang-tidy

no member named 'msecsTo' in 'PerformanceTimer' [clang-diagnostic-error]

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clang-tidy

no member named 'msecsTo' in 'PerformanceTimer' [clang-diagnostic-error]

Check failure on line 33 in src/util/performancetimer.h

View workflow job for this annotation

GitHub Actions / clang-tidy

no member named 'msecsTo' in 'PerformanceTimer' [clang-diagnostic-error]
}

bool running() const {
Expand Down

0 comments on commit abea607

Please sign in to comment.