45 m_interval (interval),
107 if (elapsed <=
Time (0))
186 auto precision =
m_os->precision ();
187 auto flags =
m_os->flags ();
189 m_os->setf (std::ios::fixed, std:: ios::floatfield);
196 <<
" = rat: " << ratio
207 << std::setprecision (3) << std::setw (8) << speed.
GetDouble () <<
"x real time) " 208 << nEvents <<
" events processed" 213 m_os->precision (precision);
bool m_verbose
Verbose mode flag.
EventId m_event
The next progress event.
void DefaultTimePrinter(std::ostream &os)
Default Time printer.
Simulation virtual time values and global simulation resolution.
ShowProgress(const Time interval=Seconds(1.0), std::ostream &os=std::cout)
Constructor.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
ns3::Singleton declaration and template implementation.
ns3::ShowProgress declaration.
SystemWallClockMs m_timer
Wallclock timer.
High precision numerical type, implementing Q64.64 fixed precision.
Time m_interval
The target update interval, in wallclock time.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
static void Cancel(const EventId &id)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
ns3::Simulator declaration.
TimeWithUnit As(const enum Unit unit) const
Attach a unit to a Time, to facilitate output in a specific unit.
void SetVerbose(bool verbose)
Set verbose mode to print real and virtual time intervals.
void SetStream(std::ostream &os)
Set the output stream to show progress on.
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
std::ostream * m_os
The output stream to use.
const int64x64_t MAXGAIN
Maximum growth factor.
const int64x64_t HYSTERESIS
Hysteresis factor.
void Start(void)
Start a measure.
void SetInterval(const Time interval)
Set the target update interval, in wallclock time.
Declaration of classes ns3::Time and ns3::TimeWithUnit, and the TimeValue implementation classes...
uint64_t m_eventCount
Simulator event count.
void(* TimePrinter)(std::ostream &os)
Function signature for features requiring a time formatter, such as logging or ShowProgress.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void Start(void)
Start the progress timer.
void SetTimePrinter(TimePrinter lp)
Set the TimePrinter function to be used to prepend progress messages with the simulation time...
static uint64_t GetEventCount(void)
Get the number of events executed.
TimePrinter m_printer
The TimePrinter to use.
Time m_vtime
The virtual time interval.
Time Seconds(double value)
Construct a Time in the indicated unit.
double GetDouble(void) const
Get this value as a double.
void Feedback(void)
Show execution progress.
uint64_t m_repCount
Count of progress lines printed.
int64_t End(void)
Stop measuring the time since Start() was called.
ns3::EventId declarations.