conditional use of ShowProgress
I have noticed some strange behavior when using ShowProgress objects that are created but go out of scope. I would like to do, e.g.:
if (verbose)
{
ShowProgress progress (Seconds (10));
}
Simulator::Run ();
but that will not work correctly.
This would be OK:
ShowProgress progress;
if (verbose)
{
progress.SetInterval (Seconds (10));
}
Simulator::Run ();
but it displays progress in either case.
How about making the default constructor disable the output (until/unless user explicitly sets an interval)?