Skip to content

Commit

Permalink
main.cpp is updated
Browse files Browse the repository at this point in the history
Minor modification
  • Loading branch information
dujeonglee committed Oct 8, 2017
1 parent 4643f16 commit 6ff7d50
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@ void BandwidthCheck()
while (Done == false)
{
std::this_thread::sleep_for(std::chrono::seconds(1));
const float sample_bandwidth = rxsize / (1000. * 1000.);
rxsize = 0;
cummulative_bandwith += sample_bandwidth;
samples++;
printf("[AVG %5.5f MB/s][%u seconds]\n", cummulative_bandwith / samples, samples);
fflush(stdout);
if (p_File)
{
const float sample_bandwidth = rxsize / (1000. * 1000.);
rxsize = 0;
cummulative_bandwith += sample_bandwidth;
samples++;
printf("[AVG %5.5f MB/s][%u seconds]\n", cummulative_bandwith / samples, samples);
fflush(stdout);
}
}
printf("[AVG %5.5f MB/s][%u seconds]\n", cummulative_bandwith / samples, samples);
fflush(stdout);
Expand Down

0 comments on commit 6ff7d50

Please sign in to comment.