![]() |
XII Release 0.1.0
|
Helper class to schedule work in intervals typically larger than the duration of one frame. More...
#include <IntervalScheduler.h>
Protected Member Functions | |
xiiIntervalSchedulerBase (xiiTime minInterval, xiiTime maxInterval) | |
xiiUInt32 | GetHistogramIndex (xiiTime value) |
xiiTime | GetHistogramSlotValue (xiiUInt32 uiIndex) |
Static Protected Member Functions | |
static float | GetRandomZeroToOne (int pos, xiiUInt32 &seed) |
static xiiTime | GetRandomTimeJitter (int pos, xiiUInt32 &seed) |
Protected Attributes | |
xiiTime | m_MinInterval |
xiiTime | m_MaxInterval |
double | m_fInvIntervalRange |
xiiTime | m_CurrentTime |
xiiUInt32 | m_uiSeed = 0 |
xiiUInt32 | m_Histogram [HistogramSize] = {} |
xiiTime | m_HistogramSlotValues [HistogramSize] = {} |
Static Protected Attributes | |
static constexpr xiiUInt32 | HistogramSize = 32 |
Helper class to schedule work in intervals typically larger than the duration of one frame.
Tries to maintain an even workload per frame and also keep the given interval for a work as best as possible. A typical use case would be e.g. component update functions that don't need to be called every frame.