Commit 93013870 authored by Davis King's avatar Davis King

Made it so you can reset a console_progress_indicator and use

it more than once.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404214
parent d4d090f1
......@@ -43,6 +43,18 @@ namespace dlib
- #target() == target_value
!*/
inline void reset (
double target_value
);
/*!
ensures
- #target() == target_value
- performs the equivalent of:
*this = console_progress_indicator(target_value)
(i.e. resets this object with a new target value)
!*/
inline double target (
) const;
/*!
......@@ -68,7 +80,7 @@ namespace dlib
private:
const double target_val;
double target_val;
time_t start_time;
double first_val;
......@@ -165,6 +177,17 @@ namespace dlib
}
// ----------------------------------------------------------------------------------------
void console_progress_indicator::
reset (
double target_value
)
{
*this = console_progress_indicator(target_value);
}
// ----------------------------------------------------------------------------------------
}
#endif // DLIB_CONSOLE_PROGRESS_INDiCATOR_H__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment