195 {
196
197 fl::json requestCopy = jsonRpcRequest;
198 fl::string funcName = requestCopy[
"method"].
as_string().value_or(
"unknown");
199
200
201 mScheduler.schedule(timestamp, [
this, requestCopy, timestamp, receivedAt, funcName]() {
203
204
206
207
209 recordResult(funcName, response[
"result"], timestamp, receivedAt, executedAt,
true);
210 }
211 });
212
213 FL_DBG(
"Scheduled RPC: " << funcName <<
" at " << timestamp);
214}
void recordResult(const fl::string &funcName, const fl::json &result, u32 scheduledAt, u32 receivedAt, u32 executedAt, bool wasScheduled)
fl::net::RpcScheduler mScheduler
bool contains(size_t idx) const FL_NOEXCEPT
fl::optional< fl::string > as_string() const FL_NOEXCEPT
fl::u32 millis()
Universal millisecond timer - returns milliseconds since system startup.