| 39 | class HTTPRPCTimer : public RPCTimerBase { |
| 40 | public: |
| 41 | HTTPRPCTimer(struct event_base *eventBase, std::function<void()> &func, |
| 42 | int64_t millis) |
| 43 | : ev(eventBase, false, func) { |
| 44 | struct timeval tv; |
| 45 | tv.tv_sec = millis / 1000; |
| 46 | tv.tv_usec = (millis % 1000) * 1000; |
| 47 | ev.trigger(&tv); |
| 48 | } |
| 49 | |
| 50 | private: |
| 51 | HTTPEvent ev; |