MPD
0.20.6
|
This class monitors a timeout. More...
#include <TimeoutMonitor.hxx>
Public Member Functions | |
TimeoutMonitor (EventLoop &_loop) | |
~TimeoutMonitor () | |
EventLoop & | GetEventLoop () |
bool | IsActive () const |
void | Schedule (std::chrono::steady_clock::duration d) |
void | Cancel () |
Protected Member Functions | |
virtual void | OnTimeout ()=0 |
Friends | |
class | EventLoop |
This class monitors a timeout.
Use Schedule() to begin the timeout or Cancel() to cancel it.
This class is not thread-safe, all methods must be called from the thread that runs the EventLoop, except where explicitly documented as thread-safe.
Definition at line 37 of file TimeoutMonitor.hxx.
|
inline |
Definition at line 45 of file TimeoutMonitor.hxx.
|
inline |
Definition at line 49 of file TimeoutMonitor.hxx.
void TimeoutMonitor::Cancel | ( | ) |
|
inline |
Definition at line 53 of file TimeoutMonitor.hxx.
|
inline |
Definition at line 57 of file TimeoutMonitor.hxx.
|
protectedpure virtual |
void TimeoutMonitor::Schedule | ( | std::chrono::steady_clock::duration | d | ) |
|
friend |
Definition at line 38 of file TimeoutMonitor.hxx.