Utilities¶
- class
Class for keeping track of expected times for operations.
Example usage:
using namespace std::literals::chrono_literals; Timeout timeout(2s); try { doAThing(); timeout.check(); do { keepGoing(); timeout.check(); } while (stillGoing()) } catch(Timeout::Expired) { std::cout << "took too long" << std::endl;
Public Functions
-
Timeout::
Timeout
(duration_type duration)¶ create a timeout
duration
in the future
-
Timeout::
Timeout
(clock::time_point end)¶ create a timeout ending at
end
-
void
Timeout::
wait
() const¶ wait for the timeout to expire
- class
Inherits from exception
-
- class
Heirarchical logger, use to produce indented logs.
- class