Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/server.cpp
Show First 20 Lines • Show All 325 Lines • ▼ Show 20 Lines | static UniValue stop(const Config &config, const JSONRPCRequest &jsonRequest) { | ||||
if (jsonRequest.params[0].isNum()) { | if (jsonRequest.params[0].isNum()) { | ||||
MilliSleep(jsonRequest.params[0].get_int()); | MilliSleep(jsonRequest.params[0].get_int()); | ||||
} | } | ||||
return "Bitcoin server stopping"; | return "Bitcoin server stopping"; | ||||
} | } | ||||
static UniValue uptime(const Config &config, | static UniValue uptime(const Config &config, | ||||
const JSONRPCRequest &jsonRequest) { | const JSONRPCRequest &jsonRequest) { | ||||
if (jsonRequest.fHelp || jsonRequest.params.size() > 1) { | if (jsonRequest.fHelp || jsonRequest.params.size() > 0) { | ||||
throw std::runtime_error("uptime\n" | throw std::runtime_error("uptime\n" | ||||
"\nReturns the total uptime of the server.\n" | "\nReturns the total uptime of the server.\n" | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"ttt (numeric) The number of seconds " | "ttt (numeric) The number of seconds " | ||||
"that the server has been running\n" | "that the server has been running\n" | ||||
"\nExamples:\n" + | "\nExamples:\n" + | ||||
HelpExampleCli("uptime", "") + | HelpExampleCli("uptime", "") + | ||||
HelpExampleRpc("uptime", "")); | HelpExampleRpc("uptime", "")); | ||||
▲ Show 20 Lines • Show All 302 Lines • Show Last 20 Lines |