MCPcopy Create free account
hub / github.com/ElementsProject/elements / QtRPCTimerBase

Class QtRPCTimerBase

src/qt/rpcconsole.cpp:111–126  ·  view source on GitHub ↗

Class for handling RPC timers * (used for e.g. re-locking the wallet after a timeout) */

Source from the content-addressed store, hash-verified

109 * (used for e.g. re-locking the wallet after a timeout)
110 */
111class QtRPCTimerBase: public QObject, public RPCTimerBase
112{
113 Q_OBJECT
114public:
115 QtRPCTimerBase(std::function<void()>& _func, int64_t millis):
116 func(_func)
117 {
118 timer.setSingleShot(true);
119 connect(&timer, &QTimer::timeout, [this]{ func(); });
120 timer.start(millis);
121 }
122 ~QtRPCTimerBase() {}
123private:
124 QTimer timer;
125 std::function<void()> func;
126};
127
128class QtRPCTimerInterface: public RPCTimerInterface
129{

Callers

nothing calls this directly

Calls 1

startMethod · 0.45

Tested by

no test coverage detected