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