Created
October 29, 2021 08:27
-
-
Save shawnfeng0/ed1d0295bbd50c50d9f35165c967c20f to your computer and use it in GitHub Desktop.
For the method of refreshing the terminal output line, refer to: https://github.com/ninja-build/ninja/blob/0cd88287a4cd77d11c92c7a9b44bb15fb787a1ee/src/line_printer.cc#L66
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#define REFRESH_OUTPUT_LINE(token) \ | |
std::cout << "\r"; \ | |
std::cout << #token << " => " << (token); \ | |
std::cout << "\x1b[K"; \ | |
std::cout.flush(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment