| 655 | } |
| 656 | |
| 657 | void RPCRunLater(const std::string& name, boost::function<void(void)> func, int64_t nSeconds) |
| 658 | { |
| 659 | if (!timerInterface) |
| 660 | throw JSONRPCError(RPC_INTERNAL_ERROR, "No timer handler registered for RPC"); |
| 661 | deadlineTimers.erase(name); |
| 662 | LogPrint("rpc", "queue run of timer %s in %i seconds (using %s)\n", name, nSeconds, timerInterface->Name()); |
| 663 | deadlineTimers.emplace(name, std::unique_ptr<RPCTimerBase>(timerInterface->NewTimer(func, nSeconds*1000))); |
| 664 | } |
| 665 | |
| 666 | const CRPCTable tableRPC; |
| 667 |
no test coverage detected