Skip to content

Commit

Permalink
Redirect sampling back to stdout
Browse files Browse the repository at this point in the history
Moving data printing back to stdout is needed for autopower devices.
  • Loading branch information
UsualSpec committed Oct 21, 2024
1 parent b747c26 commit 328da08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Sampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void Sampler::continuous_print_tick()
if (settings::countinous_timestamp_flag) {
// I wanted to use duration<float, ratio<1>>, but this resulted in weird constant epoch
auto ms_since_epoch = std::chrono::duration_cast<std::chrono::milliseconds>(timestamp.time_since_epoch()).count();
settings::output_stream << ms_since_epoch * 0.001 << ",";
std::cout << ms_since_epoch * 0.001 << ",";
}
settings::output_stream << buf << std::endl;
std::cout << buf << std::endl;
}

0 comments on commit 328da08

Please sign in to comment.