| 240 | } |
| 241 | |
| 242 | static UniValue uptime(const JSONRPCRequest& jsonRequest) |
| 243 | { |
| 244 | if (jsonRequest.fHelp || jsonRequest.params.size() > 1) |
| 245 | throw std::runtime_error( |
| 246 | "uptime\n" |
| 247 | "\nReturns the total uptime of the server.\n" |
| 248 | "\nResult:\n" |
| 249 | "ttt (numeric) The number of seconds that the server has been running\n" |
| 250 | "\nExamples:\n" |
| 251 | + HelpExampleCli("uptime", "") |
| 252 | + HelpExampleRpc("uptime", "") |
| 253 | ); |
| 254 | |
| 255 | return GetTime() - GetStartupTime(); |
| 256 | } |
| 257 | |
| 258 | /** |
| 259 | * Call Table |
nothing calls this directly
no test coverage detected