/** * A mixin to give any class a timeout method that can be used by * Timer(). */ class Timer_Mixin { public: virtual ~Timer_Mixin() {}; virtual void on_timeout() = 0; }; /** * Timer class. */ class Timer { public: Timer(Timer_Mixin &m); ~Timer(); void schedule(struct timeval *tv); };