SCSIMON immediately dies and doesn't collect any data (#271)

* SCSIMON immediately exits due to an introduced code error

* Fix string printout

Co-authored-by: Tony Kuker <akuker@gmail.com>
This commit is contained in:
akuker
2021-09-26 01:46:23 -05:00
committed by GitHub
parent 18e55bea2d
commit c98dec8f44

View File

@@ -412,7 +412,7 @@ int main(int argc, char* argv[])
sched_setscheduler(0, SCHED_FIFO, &schparam);
// Start execution
running = false;
running = true;
bus->SetACT(FALSE);
(void)gettimeofday(&start_time, NULL);
@@ -481,7 +481,7 @@ int main(int argc, char* argv[])
s << "Elapsed time: " << elapsed_us << " microseconds (" << elapsed_us / 1000000 << " seconds)";
LOGINFO("%s", s.str().c_str());
s.str("");
s << "Collected %lu changes" << data_idx;
s << "Collected " << data_idx << " changes";
LOGINFO("%s", s.str().c_str());
// Note: ns_per_loop is a global variable that is used by Cleanup() to printout the timestamps.