|
| | RisingDelay (uint32_t minDelayMs=200, uint32_t maxDelayMs=10000, uint32_t delayStep=100, size_t iteration=0) |
| | Creates rising delay instance. More...
|
| |
| uint32_t | getDelay (std::size_t iteration) |
| | Calculates delay for iteration. More...
|
| |
| uint32_t | getDelay () |
| | Calculates delay and increases iteration internally. More...
|
| |
| void | wait (std::size_t iteration) |
| | Executes thread delay for given iteration. More...
|
| |
|
void | wait () |
| | Executes thread delay and increases iteration internally.
|
| |
| void | reset (std::size_t iteration=0) |
| | Resets internal iterator. More...
|
| |
◆ RisingDelay()
| RisingDelay::RisingDelay |
( |
uint32_t |
minDelayMs = 200, |
|
|
uint32_t |
maxDelayMs = 10000, |
|
|
uint32_t |
delayStep = 100, |
|
|
size_t |
iteration = 0 |
|
) |
| |
Creates rising delay instance.
- Parameters
-
| minDelayMs | minimum delay (start delay). |
| maxDelayMs | highest possible delay. |
◆ getDelay() [1/2]
| uint32_t RisingDelay::getDelay |
( |
std::size_t |
iteration | ) |
|
Calculates delay for iteration.
- Parameters
-
| iteration | of your loop (i.e. retry count) as size_t - higher iteration means higher delay. |
- Returns
- uint32_t delay in milliseconds .
◆ getDelay() [2/2]
| uint32_t RisingDelay::getDelay |
( |
| ) |
|
Calculates delay and increases iteration internally.
- Returns
- delay in milliseconds.
◆ reset()
| void RisingDelay::reset |
( |
std::size_t |
iteration = 0 | ) |
|
Resets internal iterator.
- Parameters
-
| iteration | starting value of internal iterator. |
◆ wait()
| void RisingDelay::wait |
( |
std::size_t |
iteration | ) |
|
Executes thread delay for given iteration.
- Parameters
-
| iteration | of your loop (i.e. retry count) as size_t - higher iteration means higher delay. If -1 we use internal iterator. |
The documentation for this class was generated from the following file:
- C:/CProjects/Libs/CommonLib/include/commonlib/threading/risingdelay.h