Template Class BoundFunctionCycleTimer
Defined in File sim_cycle_timer.h
Inheritance Relationships
Base Type
public CycleTimer(Class CycleTimer)
Class Documentation
-
template<class C>
class BoundFunctionCycleTimer : public CycleTimer Public Types
Public Functions
-
inline constexpr BoundFunctionCycleTimer(C &_c, bound_full_fct_t _f)
-
inline constexpr BoundFunctionCycleTimer(C &_c, bound_noret_fct_t _f)
-
inline constexpr BoundFunctionCycleTimer(C &_c, bound_noarg_fct_t _f)
-
inline virtual cycle_count_t next(cycle_count_t when) final override
Callback from the cycle loop.
Note
there’s no guarantee the method will be called exactly on the required ‘when’ cycle. The only guarantee is “called ‘when’ <= ‘current cycle’”, the implementations must account for this.
Note
The next ‘when’ can be in the ‘past’ (i.e. <= ‘current cycle’). In this case, the timer will be called again within the same cycle with the given next ‘when’. The only constraint is that it must be greater than the previous ‘when’. If it’s negative or zero, the timer is removed from the queue.
- Parameters:
when – current ‘when’ cycle, at which the timer was scheduled
- Returns:
the next ‘when’ the timer requires to be called at.
Public Members
-
const bound_full_fct_t f_full
-
const bound_noret_fct_t f_noret
-
const bound_noarg_fct_t f_noarg
-
inline constexpr BoundFunctionCycleTimer(C &_c, bound_full_fct_t _f)