Execute a function periodically, which takes more or less time to run. More...
 Inheritance diagram for anonymous_namespace{sample-show-progress.cc}::Hold:
 Inheritance diagram for anonymous_namespace{sample-show-progress.cc}::Hold: Collaboration diagram for anonymous_namespace{sample-show-progress.cc}::Hold:
 Collaboration diagram for anonymous_namespace{sample-show-progress.cc}::Hold:| Public Member Functions | |
| Hold (Time wait, Time interval) | |
| Create a Hold with mean inter-event time wait, changing workload every interval.  More... | |
| Hold (Ptr< RandomVariableStream > rng) | |
| Create a hold with a specified random number generator for the wait time.  More... | |
| void | Event (void) | 
| The Hold event.  More... | |
|  Public Member Functions inherited from ns3::SimpleRefCount< Hold > | |
| SimpleRefCount () | |
| Default constructor.  More... | |
| SimpleRefCount (const SimpleRefCount &o) | |
| Copy constructor.  More... | |
| uint32_t | GetReferenceCount (void) const | 
| Get the reference count of the object.  More... | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) | 
| Assignment operator.  More... | |
| void | Ref (void) const | 
| Increment the reference count.  More... | |
| void | Unref (void) const | 
| Decrement the reference count.  More... | |
| Private Attributes | |
| SystemCondition | m_condition | 
| Timer to represent workload.  More... | |
| Time | m_interval | 
| Time between switching workloads.  More... | |
| Ptr< RandomVariableStream > | m_rng | 
| The random number generator for the interval between events.  More... | |
| Time | m_wait | 
| Mean inter-event time.  More... | |
Execute a function periodically, which takes more or less time to run.
Inspired by PHOLD.
Definition at line 53 of file sample-show-progress.cc.
Create a Hold with mean inter-event time wait, changing workload every interval.
| wait | The mean inter-event time. | 
| interval | How often to change work load. This should be an order of magnitude larger than wait. | 
Definition at line 64 of file sample-show-progress.cc.
| 
 | inline | 
Create a hold with a specified random number generator for the wait time.
The RNG value will be interpreted as seconds.
| rng | The random variable generator to use for the inter-event time. | 
Definition at line 78 of file sample-show-progress.cc.
| 
 | inline | 
The Hold event.
Definition at line 83 of file sample-show-progress.cc.
References ns3::int64x64_t::GetHigh(), ns3::Time::GetNanoSeconds(), ns3::Simulator::Now(), NS_LOG_LOGIC, ns3::Simulator::Schedule(), and ns3::Seconds().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | private | 
Timer to represent workload.
Definition at line 103 of file sample-show-progress.cc.
| 
 | private | 
Time between switching workloads.
Definition at line 107 of file sample-show-progress.cc.
| 
 | private | 
The random number generator for the interval between events.
Definition at line 101 of file sample-show-progress.cc.
| 
 | private | 
Mean inter-event time.
Definition at line 105 of file sample-show-progress.cc.