ReduxLib C++ 2025.0.0-beta2
|
#include <CooldownWarning.h>
Public Types | |
using | size_type = std::vector< units::second_t >::size_type |
Public Member Functions | |
CooldownWarning (units::second_t threshold, size_type cnt) | |
bool | feed () |
Class that yells at the user if feed is called too often in too short a succession.
Typically used to help prevent obliterating flash.
using redux::canand::CooldownWarning::size_type = std::vector<units::second_t>::size_type |
Alias for std::vector's size_type.
|
inline |
Constructor.
threshold | Maximum number of seconds that need to pass between the first and last calls |
cnt | Number of calls that must pass within thresholdSeconds to trigger the warning |
|
inline |
Feed the CooldownWarning.