git-svn-id: svn://db.shs.com.ru/pip@501 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">PIP
|
||||
 <span id="projectnumber">0.7.1</span>
|
||||
 <span id="projectnumber">1.0.0_rc3</span>
|
||||
</div>
|
||||
<div id="projectbrief">Platform-Independent Primitives</div>
|
||||
</td>
|
||||
@@ -223,7 +223,7 @@ Synopsis</h1>
|
||||
<p>This class provide arithmetic functions for POSIX system time. This time represents as seconds and nanosecons in integer formats. You can take current system time with function <em><a class="el" href="class_p_i_system_time.html#a9d1cc158167c09bb920ffdc9bf65ad51" title="Returns current system time. ">PISystemTime::current()</a></em>, compare times, sum or subtract two times, convert time to/from seconds, milliseconds, microseconds or nanoseconds. </p>
|
||||
<h1><a class="anchor" id="PISystemTime_sec1"></a>
|
||||
Example</h1>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> main() {</div><div class="line"> <a class="code" href="class_p_i_system_time.html">PISystemTime</a> t0; <span class="comment">// s = ns = 0</span></div><div class="line"> t0.<a class="code" href="class_p_i_system_time.html#acd6dbda302fd70a2d27e2bd3af7ae29c">addMilliseconds</a>(200); <span class="comment">// s = 0, ns = 200000000</span></div><div class="line"> t0.<a class="code" href="class_p_i_system_time.html#acd6dbda302fd70a2d27e2bd3af7ae29c">addMilliseconds</a>(900); <span class="comment">// s = 1, ns = 100000000</span></div><div class="line"> t0 -= <a class="code" href="class_p_i_system_time.html#ab3a2f936923f05320f47eb581f924bb3">PISystemTime::fromSeconds</a>(0.1); <span class="comment">// s = 1, ns = 0</span></div><div class="line"> t0.<a class="code" href="class_p_i_system_time.html#ad290b000832a523754c315404b36ce9b">sleep</a>(); <span class="comment">// sleep for 1 second</span></div><div class="line"> <a class="code" href="class_p_i_system_time.html">PISystemTime</a> t1;</div><div class="line"> t0 = <a class="code" href="pitime_8h.html#abcad1d713a692c67abf44720aff77abc">currentSystemTime</a>();</div><div class="line"> <a class="code" href="pitime_8h.html#a10862d1267284ae224b51ad95f90c931">piMSleep</a>(500);</div><div class="line"> t1 = <a class="code" href="pitime_8h.html#abcad1d713a692c67abf44720aff77abc">currentSystemTime</a>();</div><div class="line"> (t1 - t0).<a class="code" href="class_p_i_system_time.html#ad290b000832a523754c315404b36ce9b">sleep</a>(); <span class="comment">// sleep for 500 milliseconds</span></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">};</div></div><!-- fragment --></div><h2 class="groupheader">Member Function Documentation</h2>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> main() {</div><div class="line"> <a class="code" href="class_p_i_system_time.html">PISystemTime</a> t0; <span class="comment">// s = ns = 0</span></div><div class="line"> t0.<a class="code" href="class_p_i_system_time.html#acd6dbda302fd70a2d27e2bd3af7ae29c">addMilliseconds</a>(200); <span class="comment">// s = 0, ns = 200000000</span></div><div class="line"> t0.<a class="code" href="class_p_i_system_time.html#acd6dbda302fd70a2d27e2bd3af7ae29c">addMilliseconds</a>(900); <span class="comment">// s = 1, ns = 100000000</span></div><div class="line"> t0 -= <a class="code" href="class_p_i_system_time.html#ab3a2f936923f05320f47eb581f924bb3">PISystemTime::fromSeconds</a>(0.1); <span class="comment">// s = 1, ns = 0</span></div><div class="line"> t0.<a class="code" href="class_p_i_system_time.html#ad290b000832a523754c315404b36ce9b">sleep</a>(); <span class="comment">// sleep for 1 second</span></div><div class="line"> <a class="code" href="class_p_i_system_time.html">PISystemTime</a> t1;</div><div class="line"> t0 = currentSystemTime();</div><div class="line"> <a class="code" href="pitime_8h.html#a10862d1267284ae224b51ad95f90c931">piMSleep</a>(500);</div><div class="line"> t1 = currentSystemTime();</div><div class="line"> (t1 - t0).<a class="code" href="class_p_i_system_time.html#ad290b000832a523754c315404b36ce9b">sleep</a>(); <span class="comment">// sleep for 500 milliseconds</span></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">};</div></div><!-- fragment --></div><h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="ad290b000832a523754c315404b36ce9b"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ad290b000832a523754c315404b36ce9b">◆ </a></span>sleep()</h2>
|
||||
|
||||
@@ -256,7 +256,7 @@ Example</h1>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="class_p_i_system_time.html">PISystemTime</a></li>
|
||||
<li class="footer">Generated on Mon Feb 27 2017 15:24:46 for PIP by
|
||||
<li class="footer">Generated on Tue May 23 2017 11:20:44 for PIP by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user