Time-limited-operation helper.
More...
#include <util.h>
|
| | MaxTimeout (std::chrono::duration< double > seconds) |
| | Start a countdown of the given duration.
|
| |
| bool | TimedOut () const |
| | Whether the countdown has elapsed.
|
| |
| std::chrono::duration< double > | Remaining () const |
| | Time left before the countdown elapses.
|
| |
|
| std::chrono::steady_clock::time_point | dieAfter |
| | Time point at which TimedOut() will start returning true.
|
| |
Time-limited-operation helper.
Example:
while (!
timer.TimedOut()) { ... }
Time-limited-operation helper.
Definition at line 266 of file util.h.
◆ MaxTimeout()
| profinet::MaxTimeout::MaxTimeout |
( |
std::chrono::duration< double > |
seconds | ) |
|
|
inlineexplicit |
Start a countdown of the given duration.
- Parameters
-
Definition at line 271 of file util.h.
◆ Remaining()
| std::chrono::duration< double > profinet::MaxTimeout::Remaining |
( |
| ) |
const |
|
inline |
◆ TimedOut()
| bool profinet::MaxTimeout::TimedOut |
( |
| ) |
const |
|
inline |
◆ dieAfter
| std::chrono::steady_clock::time_point profinet::MaxTimeout::dieAfter |
|
private |
The documentation for this class was generated from the following file: