| 27 | class HTTPRPCTimer : public RPCTimerBase { |
| 28 | public: |
| 29 | HTTPRPCTimer(struct event_base* eventBase, std::function<void()>& func, int64_t millis) |
| 30 | : ev(eventBase, false, func) { |
| 31 | struct timeval tv; |
| 32 | tv.tv_sec = millis / 1000; |
| 33 | tv.tv_usec = (millis % 1000) * 1000; |
| 34 | ev.trigger(&tv); |
| 35 | } |
| 36 | |
| 37 | private: |
| 38 | HTTPEvent ev; |