#include <IntervalScheduler.h>
|
PL_ALWAYS_INLINE | plIntervalScheduler (plTime minInterval=plTime::MakeFromMilliseconds(1), plTime maxInterval=plTime::MakeFromSeconds(1)) |
|
void | AddOrUpdateWork (const T &work, plTime interval) |
|
void | RemoveWork (const T &work) |
|
plTime | GetInterval (const T &work) const |
|
void | Update (plTime deltaTime, RunWorkCallback runWorkCallback) |
| Advances the scheduler by deltaTime and triggers runWorkCallback for each work that should be run during this update step. Since it is not possible to maintain the exact interval all the time the actual delta time for the work is also passed to runWorkCallback.
|
|
void | Clear () |
|
|
| plIntervalSchedulerBase (plTime minInterval, plTime maxInterval) |
|
plUInt32 | GetHistogramIndex (plTime value) |
|
plTime | GetHistogramSlotValue (plUInt32 uiIndex) |
|
static float | GetRandomZeroToOne (int pos, plUInt32 &seed) |
|
static plTime | GetRandomTimeJitter (int pos, plUInt32 &seed) |
|
plTime | m_MinInterval |
|
plTime | m_MaxInterval |
|
double | m_fInvIntervalRange |
|
plTime | m_CurrentTime |
|
plUInt32 | m_uiSeed = 0 |
|
plUInt32 | m_Histogram [HistogramSize] = {} |
|
plTime | m_HistogramSlotValues [HistogramSize] = {} |
|
static constexpr plUInt32 | HistogramSize = 32 |
|
template<typename T>
class plIntervalScheduler< T >
- See also
- plIntervalSchedulerBase
The documentation for this class was generated from the following files: