| 20 | { |
| 21 | public: |
| 22 | HTTPRPCTimer(struct event_base* eventBase, boost::function<void(void)>& func, int64_t millis) : |
| 23 | ev(eventBase, false, func) |
| 24 | { |
| 25 | struct timeval tv; |
| 26 | tv.tv_sec = millis/1000; |
| 27 | tv.tv_usec = (millis%1000)*1000; |
| 28 | ev.trigger(&tv); |
| 29 | } |
| 30 | private: |
| 31 | HTTPEvent ev; |
| 32 | }; |