Changeset 16ee228 for doc/theses


Ignore:
Timestamp:
Jun 2, 2020, 3:54:55 PM (18 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
64e9fef
Parents:
47a541d
Message:

Changed benchmark to only print progress if in a tty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/thierry_delisle_PhD/code/relaxed_list.cpp

    r47a541d r16ee228  
    127127        auto before = Clock::now();
    128128        barrier.wait(0);
     129        bool is_tty = isatty(STDOUT_FILENO);
    129130
    130131        while(true) {
     
    136137                        break;
    137138                }
    138                 std::cout << "\r" << std::setprecision(4) << durr.count();
    139                 std::cout.flush();
     139                if(is_tty) {
     140                        std::cout << "\r" << std::setprecision(4) << durr.count();
     141                        std::cout.flush();
     142                }
    140143        }
    141144
Note: See TracChangeset for help on using the changeset viewer.