Skip to content

Commit a3fa21b

Browse files
committed
Fix bug where runtime was not started with --no-display
1 parent 56f9c28 commit a3fa21b

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/CommandLineUtilities/ProgramDmaBench.cxx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -446,15 +446,21 @@ class ProgramDmaBench: public Program
446446
}
447447
}
448448

449-
// Status display updates
450-
// Wait until the DMA has really started before printing our table to avoid messy output
451-
if (!mOptions.noDisplay && mPushCount.load(std::memory_order_relaxed) != 0) {
452-
if (!mRunTimeStarted) { // Start counting time when the first page arrives
449+
if (mPushCount.load(std::memory_order_relaxed) != 0) {
450+
451+
// Start our run timer when DMA starts
452+
if (!mRunTimeStarted) {
453453
mRunTime.start = std::chrono::steady_clock::now();
454454
mRunTimeStarted = true;
455455
}
456-
updateStatusDisplay();
456+
457+
// Status display updates
458+
// Wait until the DMA has really started before printing our table to avoid messy output
459+
if(!mOptions.noDisplay) {
460+
updateStatusDisplay();
461+
}
457462
}
463+
458464
next += LOW_PRIORITY_INTERVAL;
459465
std::this_thread::sleep_until(next);
460466
}

0 commit comments

Comments
 (0)