Tool Libs
UMIT-TIROL Institute of Automation and Control Engineering library collection
 
Loading...
Searching...
No Matches
deadline.h
Go to the documentation of this file.
1
5#pragma once
6#include <cstdint>
15struct Deadline {
16 uint32_t when{};
18 bool operator()(uint32_t now) {
19 if (when == 0 || now < when) return false;
20 when = 0;
21 return true;
22 }
23};
simple solution for keeping track of timeouts
Definition deadline.h:15
bool operator()(uint32_t now)
deadline has passed
Definition deadline.h:18