Euphoria
cli_progress_dots.cc
Go to the documentation of this file.
2 
3 #include <iostream>
4 
5 namespace eu::core
6 {
7  void
9  {
10  const auto now = get_current_timepoint();
11  if(has_printed)
12  {
13  if(get_seconds_between(last, now) < 0.2f)
14  {
15  return;
16  }
17  }
18  std::cout << ".";
19  std::cout.flush();
20  dots_on_line += 1;
21 
22  last = now;
23  has_printed = true;
24 
26  {
27  std::cout << "\n";
28  dots_on_line = 0;
29  }
30  }
31 }
TimePoint get_current_timepoint()
Definition: timepoint.cc:6
float get_seconds_between(const TimePoint &start, const TimePoint &end)
Definition: timepoint.cc:12