| 550 | } |
| 551 | |
| 552 | void RPCRunLater(const std::string& name, boost::function<void(void)> func, int64_t nSeconds) |
| 553 | { |
| 554 | if (timerInterfaces.empty()) |
| 555 | throw JSONRPCError(RPC_INTERNAL_ERROR, "No timer handler registered for RPC"); |
| 556 | deadlineTimers.erase(name); |
| 557 | RPCTimerInterface* timerInterface = timerInterfaces[0]; |
| 558 | LogPrint("rpc", "queue run of timer %s in %i seconds (using %s)\n", name, nSeconds, timerInterface->Name()); |
| 559 | deadlineTimers.insert(std::make_pair(name, boost::shared_ptr<RPCTimerBase>(timerInterface->NewTimer(func, nSeconds*1000)))); |
| 560 | } |
| 561 | |
| 562 | const CRPCTable tableRPC; |
no test coverage detected