10 const int kBarWidth = 60;
19 : fDone(false), fIFrac(-1), fStart(
time(0)), fPrevCall(
time(0)), fLive(false)
45 const time_t t_now =
time(0);
46 const int ifrac = (kBarWidth-1)*frac;
58 const bool isFile = (buf.st_mode & S_IFREG) || (buf.st_mode & S_IFIFO);
62 for(
int i = 0;
i < ifrac; ++
i) str[
i] =
'=';
65 str[kBarWidth-1] =
']';
68 const int elapse = t_now -
fStart;
Cuts and Vars for the 2020 FD DiF Study.
::xsd::cxx::tree::time< char, simple_type > time
bool fDone
Has Done been called?
static bool fAnyLive
Are any bars live?
Progress(const std::string &title)
Create and draw the progress bar.
double frac(double x)
Fractional part.
int fIFrac
What character are we on? Prevents unnecessary redraws.
void SetProgress(double frac)
Update the progress fraction between zero and one.
void Format(TGraph *gr, int lcol, int lsty, int lwid, int mcol, int msty, double msiz)
bool fLive
Is this bar live (drawable?)
std::string FormatTime(double sec) const
void Done()
Call this when action is completed.