| 35 | TimerCallback(std::weak_ptr<TimerImpl> timer, size_t id) : _timer(std::move(timer)), _id(id) {} |
| 36 | |
| 37 | bool operator()() const |
| 38 | { |
| 39 | if (auto timer = _timer.lock()) { |
| 40 | return timer->notify(_id); |
| 41 | } |
| 42 | return false; |
| 43 | } |
| 44 | |
| 45 | private: |
| 46 | std::weak_ptr<TimerImpl> _timer; |