static UniValue uptime(const JSONRPCRequest& jsonRequest) { if (jsonRequest.fHelp || jsonRequest.params.size() > 1) throw std::runtime_error( "uptime\n" "\nReturns the total uptime of the server.\n" "\nResult:\n" "ttt (numeric) The number of seconds that the server has been running\n" "\nExamples:\n" + HelpExampleCli("uptime", "") + HelpExampleRpc("uptime", "") ); return GetTime() - GetStartupTime(); }
QString ClientModel::formatClientStartupTime() const { return QDateTime::fromTime_t(GetStartupTime()).toString(); }