RPC - Add new uptime RPC

This commit is contained in:
thephez 2019-08-21 13:11:30 -04:00
parent f511dd718f
commit 0e6f88e5c4
7 changed files with 50 additions and 0 deletions

View file

@ -155,6 +155,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core
* [GetMemoryInfo][rpc getmemoryinfo]: {{summary_getMemoryInfo}} {{DASH_UPDATED0_14_1}} {{NEW_14_0}}
* [Help][rpc help]: {{summary_help}}
* [Stop][rpc stop]: {{summary_stop}}
* [Uptime][rpc uptime]: {{summary_uptime}}
{% endautocrossref %}

View file

@ -0,0 +1,42 @@
{% comment %}
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
{% endcomment %}
{% assign filename="_includes/devdoc/dash-core/rpcs/rpcs/uptime.md" %}
<!--__-->
##### Uptime
{% include helpers/subhead-links.md %}
{% assign summary_uptime="returns the total uptime of the server." %}
{% autocrossref %}
The `uptime` RPC {{summary_uptime}}
*Parameters: none*
*Result*
{% itemplate ntpd1 %}
- n: "`result`"
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "The number of seconds that the server has been running"
{% enditemplate %}
*Example from Dash Core 0.14.1*
{% highlight bash %}
dash-cli -testnet uptime
{% endhighlight %}
Result:
{% highlight text %}
5500
{% endhighlight %}
*See also: none*
{% endautocrossref %}