MCPcopy Create free account
hub / github.com/LUX-Core/lux / RPCRunLater

Function RPCRunLater

src/rpcserver.cpp:657–664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

655}
656
657void 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
666const CRPCTable tableRPC;
667

Callers 1

walletpassphraseFunction · 0.85

Calls 6

JSONRPCErrorFunction · 0.85
LogPrintFunction · 0.85
eraseMethod · 0.45
NameMethod · 0.45
emplaceMethod · 0.45
NewTimerMethod · 0.45

Tested by

no test coverage detected