34 #ifndef NEKTAR_LIBUTILITIES_PROGRESSBAR_HPP
35 #define NEKTAR_LIBUTILITIES_PROGRESSBAR_HPP
44 #define ISTTY _isatty(_fileno(stdout))
47 #define ISTTY isatty(fileno(stdout))
54 namespace LibUtilities
76 cout << message <<
": ";
77 float progress = position / float(goal);
78 cout << setw(3) << int(100 * progress) <<
"% [";
79 for (
int j = 0; j < int(progress * 49); j++)
83 for (
int j =
int(progress * 49); j < 49; j++)
92 if (
int(100 * position / goal) % 2 == 0)
102 #endif // NEKTAR_LIBUTILITIES_PROGRESSBAR_HPP
void PrintProgressbar(const int position, const int goal, const string message)
Prints a progressbar.