mirror of
https://github.com/boostorg/asio.git
synced 2026-01-24 17:42:08 +00:00
Use std::endl in tutorial to ensure output is flushed.
This commit is contained in:
@@ -29,14 +29,14 @@ public:
|
||||
|
||||
~printer()
|
||||
{
|
||||
std::cout << "Final count is " << count_ << "\n";
|
||||
std::cout << "Final count is " << count_ << std::endl;
|
||||
}
|
||||
|
||||
void print1()
|
||||
{
|
||||
if (count_ < 10)
|
||||
{
|
||||
std::cout << "Timer 1: " << count_ << "\n";
|
||||
std::cout << "Timer 1: " << count_ << std::endl;
|
||||
++count_;
|
||||
|
||||
timer1_.expires_at(timer1_.expires_at() + boost::posix_time::seconds(1));
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
{
|
||||
if (count_ < 10)
|
||||
{
|
||||
std::cout << "Timer 2: " << count_ << "\n";
|
||||
std::cout << "Timer 2: " << count_ << std::endl;
|
||||
++count_;
|
||||
|
||||
timer2_.expires_at(timer2_.expires_at() + boost::posix_time::seconds(1));
|
||||
|
||||
Reference in New Issue
Block a user