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