34 #ifndef NEKTAR_LIBUTILITIES_PROGRESSBAR_HPP
35 #define NEKTAR_LIBUTILITIES_PROGRESSBAR_HPP
45 #define ISTTY _isatty(_fileno(stdout))
48 #define ISTTY isatty(fileno(stdout))
55 namespace LibUtilities
72 std::cout.unsetf ( std::ios::floatfield );
78 cout << message <<
": ";
79 float progress = position / float(goal);
80 cout << setw(3) << ceil(100 * progress) <<
"% [";
81 for (
int j = 0; j < ceil(progress * 49); j++)
85 for (
int j = ceil(progress * 49); j < 49; j++)
94 if (
int(ceil(
double(100 * position / goal))) % 2 == 0)
104 #endif // NEKTAR_LIBUTILITIES_PROGRESSBAR_HPP
void PrintProgressbar(const int position, const int goal, const string message)
Prints a progressbar.