Codebase list cppad / upstream/2015.00.00.7 doc / elapsed_seconds.xml
upstream/2015.00.00.7

Tree @upstream/2015.00.00.7 (Download .tar.gz)

elapsed_seconds.xml @upstream/2015.00.00.7raw · history · blame

<?xml version='1.0'?>
<html xmlns='http://www.w3.org/1999/xhtml'
      xmlns:math='http://www.w3.org/1998/Math/MathML'
>
<head>
<title>Returns Elapsed Number of Seconds</title>
<meta http-equiv='Content-Type' content='text/html' charset='utf-8'/>
<meta name="description" id="description" content="Returns Elapsed Number of Seconds"/>
<meta name="keywords" id="keywords" content=" returns elapsed number of seconds elapsed_seconds time syntax purpose s microsoft systems example "/>
<style type='text/css'>
body { color : black }
body { background-color : white }
A:link { color : blue }
A:visited { color : purple }
A:active { color : purple }
</style>
<script type='text/javascript' language='JavaScript' src='_elapsed_seconds_xml.js'>
</script>
</head>
<body>
<table><tr>
<td>
<a href="http://www.coin-or.org/CppAD/" target="_top"><img border="0" src="_image.gif"/></a>
</td>
<td><a href="time_test.xml" target="_top">Prev</a>
</td><td><a href="elapsed_seconds.cpp.xml" target="_top">Next</a>
</td><td>
<select onchange='choose_across0(this)'>
<option>Index-&gt;</option>
<option>contents</option>
<option>reference</option>
<option>index</option>
<option>search</option>
<option>external</option>
</select>
</td>
<td>
<select onchange='choose_up0(this)'>
<option>Up-&gt;</option>
<option>CppAD</option>
<option>library</option>
<option>time_test</option>
<option>elapsed_seconds</option>
</select>
</td>
<td>
<select onchange='choose_down3(this)'>
<option>CppAD-&gt;</option>
<option>Install</option>
<option>Introduction</option>
<option>AD</option>
<option>ADFun</option>
<option>preprocessor</option>
<option>multi_thread</option>
<option>library</option>
<option>ipopt_solve</option>
<option>Example</option>
<option>speed</option>
<option>Appendix</option>
</select>
</td>
<td>
<select onchange='choose_down2(this)'>
<option>library-&gt;</option>
<option>ErrorHandler</option>
<option>NearEqual</option>
<option>speed_test</option>
<option>SpeedTest</option>
<option>time_test</option>
<option>NumericType</option>
<option>CheckNumericType</option>
<option>SimpleVector</option>
<option>CheckSimpleVector</option>
<option>nan</option>
<option>pow_int</option>
<option>Poly</option>
<option>LuDetAndSolve</option>
<option>RombergOne</option>
<option>RombergMul</option>
<option>Runge45</option>
<option>Rosen34</option>
<option>OdeErrControl</option>
<option>OdeGear</option>
<option>OdeGearControl</option>
<option>CppAD_vector</option>
<option>thread_alloc</option>
<option>index_sort</option>
<option>BenderQuad</option>
<option>opt_val_hes</option>
<option>LuRatio</option>
</select>
</td>
<td>
<select onchange='choose_down1(this)'>
<option>time_test-&gt;</option>
<option>elapsed_seconds</option>
<option>time_test.cpp</option>
</select>
</td>
<td>
<select onchange='choose_down0(this)'>
<option>elapsed_seconds-&gt;</option>
<option>elapsed_seconds.cpp</option>
</select>
</td>
<td>
<select onchange='choose_current0(this)'>
<option>Headings-&gt;</option>
<option>Syntax</option>
<option>Purpose</option>
<option>s</option>
<option>Microsoft Systems</option>
<option>Example</option>
</select>
</td>
</tr></table><br/>



<center><b><big><big>Returns Elapsed Number of Seconds</big></big></b></center>
<br/>
<b><big><a name="Syntax" id="Syntax">Syntax</a></big></b>

<br/>

<code><i><font color="black"><span style='white-space: nowrap'>s</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;=&#xA0;elapsed_seconds()</span></font></code>


<br/>
<br/>
<b><big><a name="Purpose" id="Purpose">Purpose</a></big></b>
<br/>
This routine is accurate to within .02 seconds
(see <a href="elapsed_seconds.cpp.xml" target="_top"><span style='white-space: nowrap'>elapsed_seconds.cpp</span></a>
).
It does not necessary work for time intervals that are greater than a day.
<ol type="1"><li>
If running under the Microsoft compiler, it uses 
<code><font color="blue">::GetSystemTime</font></code> for timing.
</li><li>

Otherwise, if <code><font color="blue">gettimeofday</font></code> is available, it is used.
</li><li>

Otherwise, <code><font color="blue">std::clock()</font></code> is used.
</li></ol>


<br/>
<br/>
<b><big><a name="s" id="s">s</a></big></b>
<br/>
is a <code><font color="blue">double</font></code> equal to the 
number of seconds since the first call to <code><font color="blue">elapsed_seconds</font></code>.

<br/>
<br/>
<b><big><a name="Microsoft Systems" id="Microsoft Systems">Microsoft Systems</a></big></b>
<br/>
It you are using the Microsoft C++ compiler,
you will need to link in the external routine 
called <a href="microsoft_timer.xml" target="_top"><span style='white-space: nowrap'>microsoft_timer</span></a>
.


<br/>
<br/>
<b><big><a name="Example" id="Example">Example</a></big></b>
<br/>
The routine <a href="elapsed_seconds.cpp.xml" target="_top"><span style='white-space: nowrap'>elapsed_seconds.cpp</span></a>
 is
an example and test of this routine.



<hr/>Input File: cppad/elapsed_seconds.hpp

</body>
</html>