Files
rippled/classripple_1_1TimeKeeper.html
2025-11-04 00:36:48 -08:00

495 lines
28 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>rippled: ripple::TimeKeeper Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">rippled
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceripple.html">ripple</a></li><li class="navelem"><a class="el" href="classripple_1_1TimeKeeper.html">TimeKeeper</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="#pri-static-methods">Static Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classripple_1_1TimeKeeper-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">ripple::TimeKeeper Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Manages various times used by the server.
<a href="classripple_1_1TimeKeeper.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="TimeKeeper_8h_source.html">TimeKeeper.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ripple::TimeKeeper:</div>
<div class="dyncontent">
<div class="center"><img src="classripple_1_1TimeKeeper__inherit__graph.png" border="0" usemap="#aripple_1_1TimeKeeper_inherit__map" alt="Inheritance graph"/></div>
<map name="aripple_1_1TimeKeeper_inherit__map" id="aripple_1_1TimeKeeper_inherit__map">
<area shape="rect" title="Manages various times used by the server." alt="" coords="23,93,169,119"/>
<area shape="rect" href="classripple_1_1test_1_1ManualTimeKeeper.html" title=" " alt="" coords="5,167,187,207"/>
<area shape="poly" title=" " alt="" coords="99,132,99,167,93,167,93,132"/>
<area shape="rect" href="classbeast_1_1abstract__clock.html" title=" " alt="" coords="16,5,176,45"/>
<area shape="poly" title=" " alt="" coords="99,59,99,93,93,93,93,59"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ripple::TimeKeeper:</div>
<div class="dyncontent">
<div class="center"><img src="classripple_1_1TimeKeeper__coll__graph.png" border="0" usemap="#aripple_1_1TimeKeeper_coll__map" alt="Collaboration graph"/></div>
<map name="aripple_1_1TimeKeeper_coll__map" id="aripple_1_1TimeKeeper_coll__map">
<area shape="rect" title="Manages various times used by the server." alt="" coords="34,196,179,221"/>
<area shape="rect" href="classbeast_1_1abstract__clock.html" title=" " alt="" coords="5,93,165,133"/>
<area shape="poly" title=" " alt="" coords="95,146,107,195,101,196,90,147"/>
<area shape="rect" target="_parent" href="http://en.cppreference.com/w/cpp/atomic/atomic.html" title=" " alt="" coords="190,93,373,133"/>
<area shape="poly" title=" " alt="" coords="235,142,129,198,127,194,233,138"/>
<area shape="rect" target="_parent" href="http://en.cppreference.com/w/cpp/chrono/duration.html" title=" " alt="" coords="204,5,359,31"/>
<area shape="poly" title=" " alt="" coords="284,44,284,93,279,93,279,44"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a4435fdfcd47c4f67bbb21940e5505208" id="r_a4435fdfcd47c4f67bbb21940e5505208"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbeast_1_1abstract__clock.html#a4435fdfcd47c4f67bbb21940e5505208">rep</a> = typename Clock::rep</td></tr>
<tr class="separator:a4435fdfcd47c4f67bbb21940e5505208"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abba11dabb096d89ff62699b64efb472e" id="r_abba11dabb096d89ff62699b64efb472e"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbeast_1_1abstract__clock.html#abba11dabb096d89ff62699b64efb472e">period</a> = typename Clock::period</td></tr>
<tr class="separator:abba11dabb096d89ff62699b64efb472e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad024b15fa67696e8d1eba3744e800d32" id="r_ad024b15fa67696e8d1eba3744e800d32"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbeast_1_1abstract__clock.html#ad024b15fa67696e8d1eba3744e800d32">duration</a> = typename Clock::duration</td></tr>
<tr class="separator:ad024b15fa67696e8d1eba3744e800d32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e16832b0bdf9392c5138bbbde024d8e" id="r_a4e16832b0bdf9392c5138bbbde024d8e"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbeast_1_1abstract__clock.html#a4e16832b0bdf9392c5138bbbde024d8e">time_point</a> = typename Clock::time_point</td></tr>
<tr class="separator:a4e16832b0bdf9392c5138bbbde024d8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2db1e4273a58b6431b330e3c5ebd07f" id="r_ab2db1e4273a58b6431b330e3c5ebd07f"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbeast_1_1abstract__clock.html#ab2db1e4273a58b6431b330e3c5ebd07f">clock_type</a> = <a class="el" href="classripple_1_1NetClock.html">NetClock</a></td></tr>
<tr class="separator:ab2db1e4273a58b6431b330e3c5ebd07f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:abd0e431f6ed68ad20061bada64314327" id="r_abd0e431f6ed68ad20061bada64314327"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1TimeKeeper.html#abd0e431f6ed68ad20061bada64314327">~TimeKeeper</a> ()=default</td></tr>
<tr class="separator:abd0e431f6ed68ad20061bada64314327"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a0090c133fcbeb544017a3c7eddab6e" id="r_a2a0090c133fcbeb544017a3c7eddab6e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbeast_1_1abstract__clock.html#a4e16832b0bdf9392c5138bbbde024d8e">time_point</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1TimeKeeper.html#a2a0090c133fcbeb544017a3c7eddab6e">now</a> () const override</td></tr>
<tr class="memdesc:a2a0090c133fcbeb544017a3c7eddab6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current time, using the server's clock. <br /></td></tr>
<tr class="separator:a2a0090c133fcbeb544017a3c7eddab6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada2cee023f1dcf3c80250f8840139440" id="r_ada2cee023f1dcf3c80250f8840139440"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbeast_1_1abstract__clock.html#a4e16832b0bdf9392c5138bbbde024d8e">time_point</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1TimeKeeper.html#ada2cee023f1dcf3c80250f8840139440">closeTime</a> () const</td></tr>
<tr class="memdesc:ada2cee023f1dcf3c80250f8840139440"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the predicted close time, in network time. <br /></td></tr>
<tr class="separator:ada2cee023f1dcf3c80250f8840139440"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ea20501ef727ee3f4cd25aa9c164e26" id="r_a6ea20501ef727ee3f4cd25aa9c164e26"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1TimeKeeper.html#a6ea20501ef727ee3f4cd25aa9c164e26">closeOffset</a> () const</td></tr>
<tr class="separator:a6ea20501ef727ee3f4cd25aa9c164e26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfc6614b53f236861e4e61e91574283e" id="r_abfc6614b53f236861e4e61e91574283e"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1TimeKeeper.html#abfc6614b53f236861e4e61e91574283e">adjustCloseTime</a> (<a class="elRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a> by)</td></tr>
<tr class="memdesc:abfc6614b53f236861e4e61e91574283e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adjust the close time, based on the network's view of time. <br /></td></tr>
<tr class="separator:abfc6614b53f236861e4e61e91574283e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-attribs" name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a76fc7ea130b22226cae0d891eff02f57" id="r_a76fc7ea130b22226cae0d891eff02f57"><td class="memItemLeft" align="right" valign="top">static bool const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbeast_1_1abstract__clock.html#a76fc7ea130b22226cae0d891eff02f57">is_steady</a></td></tr>
<tr class="separator:a76fc7ea130b22226cae0d891eff02f57"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-static-methods" name="pri-static-methods"></a>
Static Private Member Functions</h2></td></tr>
<tr class="memitem:a00f890d82fb32b35618b2e0e4244d6e1" id="r_a00f890d82fb32b35618b2e0e4244d6e1"><td class="memItemLeft" align="right" valign="top">static constexpr <a class="el" href="classbeast_1_1abstract__clock.html#a4e16832b0bdf9392c5138bbbde024d8e">time_point</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1TimeKeeper.html#a00f890d82fb32b35618b2e0e4244d6e1">adjust</a> (std::chrono::system_clock::time_point when)</td></tr>
<tr class="separator:a00f890d82fb32b35618b2e0e4244d6e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a0061e7bf92a6d7a7140a57d5eeb2437d" id="r_a0061e7bf92a6d7a7140a57d5eeb2437d"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://en.cppreference.com/w/cpp/atomic/atomic.html">std::atomic</a>&lt; <a class="elRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classripple_1_1TimeKeeper.html#a0061e7bf92a6d7a7140a57d5eeb2437d">closeOffset_</a> {}</td></tr>
<tr class="separator:a0061e7bf92a6d7a7140a57d5eeb2437d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Manages various times used by the server. </p>
<p class="definition">Definition at line <a class="el" href="TimeKeeper_8h_source.html#l00012">12</a> of file <a class="el" href="TimeKeeper_8h_source.html">TimeKeeper.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a4435fdfcd47c4f67bbb21940e5505208" name="a4435fdfcd47c4f67bbb21940e5505208"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4435fdfcd47c4f67bbb21940e5505208">&#9670;&#160;</a></span>rep</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classbeast_1_1abstract__clock.html">beast::abstract_clock</a>&lt; <a class="el" href="classripple_1_1NetClock.html">NetClock</a> &gt;::rep = typename Clock::rep</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="abstract__clock_8h_source.html#l00038">38</a> of file <a class="el" href="abstract__clock_8h_source.html">abstract_clock.h</a>.</p>
</div>
</div>
<a id="abba11dabb096d89ff62699b64efb472e" name="abba11dabb096d89ff62699b64efb472e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abba11dabb096d89ff62699b64efb472e">&#9670;&#160;</a></span>period</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classbeast_1_1abstract__clock.html">beast::abstract_clock</a>&lt; <a class="el" href="classripple_1_1NetClock.html">NetClock</a> &gt;::period = typename Clock::period</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="abstract__clock_8h_source.html#l00039">39</a> of file <a class="el" href="abstract__clock_8h_source.html">abstract_clock.h</a>.</p>
</div>
</div>
<a id="ad024b15fa67696e8d1eba3744e800d32" name="ad024b15fa67696e8d1eba3744e800d32"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad024b15fa67696e8d1eba3744e800d32">&#9670;&#160;</a></span>duration</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classbeast_1_1abstract__clock.html">beast::abstract_clock</a>&lt; <a class="el" href="classripple_1_1NetClock.html">NetClock</a> &gt;::duration = typename Clock::duration</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="abstract__clock_8h_source.html#l00040">40</a> of file <a class="el" href="abstract__clock_8h_source.html">abstract_clock.h</a>.</p>
</div>
</div>
<a id="a4e16832b0bdf9392c5138bbbde024d8e" name="a4e16832b0bdf9392c5138bbbde024d8e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e16832b0bdf9392c5138bbbde024d8e">&#9670;&#160;</a></span>time_point</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classbeast_1_1abstract__clock.html">beast::abstract_clock</a>&lt; <a class="el" href="classripple_1_1NetClock.html">NetClock</a> &gt;::time_point = typename Clock::time_point</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="abstract__clock_8h_source.html#l00041">41</a> of file <a class="el" href="abstract__clock_8h_source.html">abstract_clock.h</a>.</p>
</div>
</div>
<a id="ab2db1e4273a58b6431b330e3c5ebd07f" name="ab2db1e4273a58b6431b330e3c5ebd07f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab2db1e4273a58b6431b330e3c5ebd07f">&#9670;&#160;</a></span>clock_type</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classbeast_1_1abstract__clock.html">beast::abstract_clock</a>&lt; <a class="el" href="classripple_1_1NetClock.html">NetClock</a> &gt;::clock_type = <a class="el" href="classripple_1_1NetClock.html">NetClock</a></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="abstract__clock_8h_source.html#l00042">42</a> of file <a class="el" href="abstract__clock_8h_source.html">abstract_clock.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="abd0e431f6ed68ad20061bada64314327" name="abd0e431f6ed68ad20061bada64314327"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd0e431f6ed68ad20061bada64314327">&#9670;&#160;</a></span>~TimeKeeper()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual ripple::TimeKeeper::~TimeKeeper </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span><span class="mlabel">default</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a00f890d82fb32b35618b2e0e4244d6e1" name="a00f890d82fb32b35618b2e0e4244d6e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00f890d82fb32b35618b2e0e4244d6e1">&#9670;&#160;</a></span>adjust()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static constexpr <a class="el" href="classbeast_1_1abstract__clock.html#a4e16832b0bdf9392c5138bbbde024d8e">time_point</a> ripple::TimeKeeper::adjust </td>
<td>(</td>
<td class="paramtype">std::chrono::system_clock::time_point&#160;</td>
<td class="paramname"><em>when</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">constexpr</span><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="TimeKeeper_8h_source.html#l00019">19</a> of file <a class="el" href="TimeKeeper_8h_source.html">TimeKeeper.h</a>.</p>
</div>
</div>
<a id="a2a0090c133fcbeb544017a3c7eddab6e" name="a2a0090c133fcbeb544017a3c7eddab6e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a0090c133fcbeb544017a3c7eddab6e">&#9670;&#160;</a></span>now()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classbeast_1_1abstract__clock.html#a4e16832b0bdf9392c5138bbbde024d8e">time_point</a> ripple::TimeKeeper::now </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the current time, using the server's clock. </p>
<p>It's possible for servers to have a different value for network time, especially if they do not use some external mechanism for time synchronization (e.g. NTP or SNTP). This is fine.</p>
<p>This estimate is not directly visible to other servers over the protocol, but it is possible for them to make an educated guess if this server publishes proposals or validations.</p>
<dl class="section note"><dt>Note</dt><dd>The network time is adjusted for the "Ripple epoch" which was arbitrarily defined as 2000-01-01T00:00:00Z by Arthur Britto and David Schwartz during early development of the code. No rationale has been provided for this curious and annoying, but otherwise unimportant, choice. </dd></dl>
<p>Implements <a class="el" href="classbeast_1_1abstract__clock.html#ac9a577663353bfea66a096f12cb85293">beast::abstract_clock&lt; NetClock &gt;</a>.</p>
<p class="definition">Definition at line <a class="el" href="TimeKeeper_8h_source.html#l00045">45</a> of file <a class="el" href="TimeKeeper_8h_source.html">TimeKeeper.h</a>.</p>
</div>
</div>
<a id="ada2cee023f1dcf3c80250f8840139440" name="ada2cee023f1dcf3c80250f8840139440"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada2cee023f1dcf3c80250f8840139440">&#9670;&#160;</a></span>closeTime()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classbeast_1_1abstract__clock.html#a4e16832b0bdf9392c5138bbbde024d8e">time_point</a> ripple::TimeKeeper::closeTime </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the predicted close time, in network time. </p>
<p>The predicted close time represents the notional "center" of the network. Each server assumes that its clock is correct and tries to pull the close time towards its measure of network time. </p>
<p class="definition">Definition at line <a class="el" href="TimeKeeper_8h_source.html#l00057">57</a> of file <a class="el" href="TimeKeeper_8h_source.html">TimeKeeper.h</a>.</p>
</div>
</div>
<a id="a6ea20501ef727ee3f4cd25aa9c164e26" name="a6ea20501ef727ee3f4cd25aa9c164e26"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ea20501ef727ee3f4cd25aa9c164e26">&#9670;&#160;</a></span>closeOffset()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a> ripple::TimeKeeper::closeOffset </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="TimeKeeper_8h_source.html#l00064">64</a> of file <a class="el" href="TimeKeeper_8h_source.html">TimeKeeper.h</a>.</p>
</div>
</div>
<a id="abfc6614b53f236861e4e61e91574283e" name="abfc6614b53f236861e4e61e91574283e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abfc6614b53f236861e4e61e91574283e">&#9670;&#160;</a></span>adjustCloseTime()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a> ripple::TimeKeeper::adjustCloseTime </td>
<td>(</td>
<td class="paramtype"><a class="elRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a>&#160;</td>
<td class="paramname"><em>by</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Adjust the close time, based on the network's view of time. </p>
<p class="definition">Definition at line <a class="el" href="TimeKeeper_8h_source.html#l00071">71</a> of file <a class="el" href="TimeKeeper_8h_source.html">TimeKeeper.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a0061e7bf92a6d7a7140a57d5eeb2437d" name="a0061e7bf92a6d7a7140a57d5eeb2437d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0061e7bf92a6d7a7140a57d5eeb2437d">&#9670;&#160;</a></span>closeOffset_</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" href="http://en.cppreference.com/w/cpp/atomic/atomic.html">std::atomic</a>&lt;<a class="elRef" href="http://en.cppreference.com/w/cpp/chrono/duration.html">std::chrono::seconds</a>&gt; ripple::TimeKeeper::closeOffset_ {}</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="TimeKeeper_8h_source.html#l00015">15</a> of file <a class="el" href="TimeKeeper_8h_source.html">TimeKeeper.h</a>.</p>
</div>
</div>
<a id="a76fc7ea130b22226cae0d891eff02f57" name="a76fc7ea130b22226cae0d891eff02f57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a76fc7ea130b22226cae0d891eff02f57">&#9670;&#160;</a></span>is_steady</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool const <a class="el" href="classbeast_1_1abstract__clock.html">beast::abstract_clock</a>&lt; <a class="el" href="classripple_1_1NetClock.html">NetClock</a> &gt;::is_steady</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="abstract__clock_8h_source.html#l00044">44</a> of file <a class="el" href="abstract__clock_8h_source.html">abstract_clock.h</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>