1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
3 | <title>mixpp: itpp::Real_Timer Class Reference</title> |
---|
4 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
5 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
6 | </head><body> |
---|
7 | <!-- Generated by Doxygen 1.5.8 --> |
---|
8 | <script type="text/javascript"> |
---|
9 | <!-- |
---|
10 | function changeDisplayState (e){ |
---|
11 | var num=this.id.replace(/[^[0-9]/g,''); |
---|
12 | var button=this.firstChild; |
---|
13 | var sectionDiv=document.getElementById('dynsection'+num); |
---|
14 | if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ |
---|
15 | sectionDiv.style.display='block'; |
---|
16 | button.src='open.gif'; |
---|
17 | }else{ |
---|
18 | sectionDiv.style.display='none'; |
---|
19 | button.src='closed.gif'; |
---|
20 | } |
---|
21 | } |
---|
22 | function initDynSections(){ |
---|
23 | var divs=document.getElementsByTagName('div'); |
---|
24 | var sectionCounter=1; |
---|
25 | for(var i=0;i<divs.length-1;i++){ |
---|
26 | if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ |
---|
27 | var header=divs[i]; |
---|
28 | var section=divs[i+1]; |
---|
29 | var button=header.firstChild; |
---|
30 | if (button!='IMG'){ |
---|
31 | divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); |
---|
32 | button=document.createElement('img'); |
---|
33 | divs[i].insertBefore(button,divs[i].firstChild); |
---|
34 | } |
---|
35 | header.style.cursor='pointer'; |
---|
36 | header.onclick=changeDisplayState; |
---|
37 | header.id='dynheader'+sectionCounter; |
---|
38 | button.src='closed.gif'; |
---|
39 | section.id='dynsection'+sectionCounter; |
---|
40 | section.style.display='none'; |
---|
41 | section.style.marginLeft='14px'; |
---|
42 | sectionCounter++; |
---|
43 | } |
---|
44 | } |
---|
45 | } |
---|
46 | window.onload = initDynSections; |
---|
47 | --> |
---|
48 | </script> |
---|
49 | <div class="navigation" id="top"> |
---|
50 | <div class="tabs"> |
---|
51 | <ul> |
---|
52 | <li><a href="main.html"><span>Main Page</span></a></li> |
---|
53 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
54 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
55 | <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
---|
56 | <li><a href="files.html"><span>Files</span></a></li> |
---|
57 | </ul> |
---|
58 | </div> |
---|
59 | <div class="tabs"> |
---|
60 | <ul> |
---|
61 | <li><a href="annotated.html"><span>Class List</span></a></li> |
---|
62 | <li><a href="classes.html"><span>Class Index</span></a></li> |
---|
63 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
64 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
65 | </ul> |
---|
66 | </div> |
---|
67 | <div class="navpath"><b>itpp</b>::<a class="el" href="classitpp_1_1Real__Timer.html">Real_Timer</a> |
---|
68 | </div> |
---|
69 | </div> |
---|
70 | <div class="contents"> |
---|
71 | <h1>itpp::Real_Timer Class Reference<br> |
---|
72 | <small> |
---|
73 | [<a class="el" href="group__timers.html">Timers</a>]</small> |
---|
74 | </h1><!-- doxytag: class="itpp::Real_Timer" --><!-- doxytag: inherits="itpp::Timer" -->A real time timer class<p> |
---|
75 | Measures real time. |
---|
76 | <a href="#_details">More...</a> |
---|
77 | <p> |
---|
78 | <code>#include <<a class="el" href="timing_8h-source.html">timing.h</a>></code> |
---|
79 | <p> |
---|
80 | |
---|
81 | <p> |
---|
82 | <a href="classitpp_1_1Real__Timer-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
83 | <tr><td></td></tr> |
---|
84 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
85 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b8f75b7ed51151fda9861ffa7dbe188b"></a><!-- doxytag: member="itpp::Real_Timer::Real_Timer" ref="b8f75b7ed51151fda9861ffa7dbe188b" args="()" --> |
---|
86 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Real__Timer.html#b8f75b7ed51151fda9861ffa7dbe188b">Real_Timer</a> ()</td></tr> |
---|
87 | |
---|
88 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new timer. Sets the time to zero. <br></td></tr> |
---|
89 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="430e4c8420c4acfd4c2b9cff842b0878"></a><!-- doxytag: member="itpp::Real_Timer::start" ref="430e4c8420c4acfd4c2b9cff842b0878" args="(void)" --> |
---|
90 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Timer.html#430e4c8420c4acfd4c2b9cff842b0878">start</a> (void)</td></tr> |
---|
91 | |
---|
92 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Start the timer. This does not set the time to zero. <br></td></tr> |
---|
93 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e1793d23cbce8d1bd3497885da051e6f"></a><!-- doxytag: member="itpp::Real_Timer::stop" ref="e1793d23cbce8d1bd3497885da051e6f" args="(void)" --> |
---|
94 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Timer.html#e1793d23cbce8d1bd3497885da051e6f">stop</a> (void)</td></tr> |
---|
95 | |
---|
96 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Stop the timer. Returns the elapsed time in seconds. <br></td></tr> |
---|
97 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cafdc07fe9e863c5ed9093224511ab8d"></a><!-- doxytag: member="itpp::Real_Timer::reset" ref="cafdc07fe9e863c5ed9093224511ab8d" args="(double t=0.0)" --> |
---|
98 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Timer.html#cafdc07fe9e863c5ed9093224511ab8d">reset</a> (double t=0.0)</td></tr> |
---|
99 | |
---|
100 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the time to time t, which is zero by default. Stops the timer if it is running. <br></td></tr> |
---|
101 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="feed20347c7ba104cbddb62e76340bc7"></a><!-- doxytag: member="itpp::Real_Timer::tic" ref="feed20347c7ba104cbddb62e76340bc7" args="(void)" --> |
---|
102 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Timer.html#feed20347c7ba104cbddb62e76340bc7">tic</a> (void)</td></tr> |
---|
103 | |
---|
104 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Resets the timer and starts it. <br></td></tr> |
---|
105 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f19c4b9b6728cfa32e8e0492d1f54acb"></a><!-- doxytag: member="itpp::Real_Timer::toc" ref="f19c4b9b6728cfa32e8e0492d1f54acb" args="(void)" --> |
---|
106 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Timer.html#f19c4b9b6728cfa32e8e0492d1f54acb">toc</a> (void)</td></tr> |
---|
107 | |
---|
108 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the elapsed time since last <a class="el" href="classitpp_1_1Timer.html#feed20347c7ba104cbddb62e76340bc7" title="Resets the timer and starts it.">tic()</a>. <br></td></tr> |
---|
109 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dc264ac0276f798f33d229e17c66f8a5"></a><!-- doxytag: member="itpp::Real_Timer::toc_print" ref="dc264ac0276f798f33d229e17c66f8a5" args="(void)" --> |
---|
110 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Timer.html#dc264ac0276f798f33d229e17c66f8a5">toc_print</a> (void)</td></tr> |
---|
111 | |
---|
112 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Prints the elapsed time since last <a class="el" href="classitpp_1_1Timer.html#feed20347c7ba104cbddb62e76340bc7" title="Resets the timer and starts it.">tic()</a>. <br></td></tr> |
---|
113 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="53aa5979d6ac8959d9443c1603de74bf"></a><!-- doxytag: member="itpp::Real_Timer::get_time" ref="53aa5979d6ac8959d9443c1603de74bf" args="() const " --> |
---|
114 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Timer.html#53aa5979d6ac8959d9443c1603de74bf">get_time</a> () const </td></tr> |
---|
115 | |
---|
116 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the elapsed time. <br></td></tr> |
---|
117 | <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> |
---|
118 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="196ab771433a2cc17ed190a81e1d39ac"></a><!-- doxytag: member="itpp::Real_Timer::get_current_time" ref="196ab771433a2cc17ed190a81e1d39ac" args="() const " --> |
---|
119 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Real__Timer.html#196ab771433a2cc17ed190a81e1d39ac">get_current_time</a> () const </td></tr> |
---|
120 | |
---|
121 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Vitrual function that returns teh current time. <br></td></tr> |
---|
122 | <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> |
---|
123 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0d907992dcce3e43494e26ee5f8881cb"></a><!-- doxytag: member="itpp::Real_Timer::start_time" ref="0d907992dcce3e43494e26ee5f8881cb" args="" --> |
---|
124 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Timer.html#0d907992dcce3e43494e26ee5f8881cb">start_time</a></td></tr> |
---|
125 | |
---|
126 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The start time of the timer. <br></td></tr> |
---|
127 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e652cc2d3a428fc989dbfd30cfef62d9"></a><!-- doxytag: member="itpp::Real_Timer::stop_time" ref="e652cc2d3a428fc989dbfd30cfef62d9" args="" --> |
---|
128 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Timer.html#e652cc2d3a428fc989dbfd30cfef62d9">stop_time</a></td></tr> |
---|
129 | |
---|
130 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The stop time of the timer. <br></td></tr> |
---|
131 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="adcc1d37966cefe6150b5ebc55f44d7c"></a><!-- doxytag: member="itpp::Real_Timer::elapsed_time" ref="adcc1d37966cefe6150b5ebc55f44d7c" args="" --> |
---|
132 | double </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Timer.html#adcc1d37966cefe6150b5ebc55f44d7c">elapsed_time</a></td></tr> |
---|
133 | |
---|
134 | <tr><td class="mdescLeft"> </td><td class="mdescRight">The ellapsed time from start to stop. <br></td></tr> |
---|
135 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="aa44f4c306bea316f974e7f0a1f3c096"></a><!-- doxytag: member="itpp::Real_Timer::running" ref="aa44f4c306bea316f974e7f0a1f3c096" args="" --> |
---|
136 | bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1Timer.html#aa44f4c306bea316f974e7f0a1f3c096">running</a></td></tr> |
---|
137 | |
---|
138 | <tr><td class="mdescLeft"> </td><td class="mdescRight">A bool that indicates if the timer is running or not. <br></td></tr> |
---|
139 | </table> |
---|
140 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
141 | A real time timer class<p> |
---|
142 | Measures real time. |
---|
143 | <p> |
---|
144 | Usage: Define a time object: <div class="fragment"><pre class="fragment"> <a class="code" href="classitpp_1_1Real__Timer.html#b8f75b7ed51151fda9861ffa7dbe188b" title="Create a new timer. Sets the time to zero.">Real_Timer</a> timer; |
---|
145 | </pre></div><p> |
---|
146 | Actions: Reset: <div class="fragment"><pre class="fragment"> timer.reset(); |
---|
147 | </pre></div> Start: <div class="fragment"><pre class="fragment"> timer.start(); |
---|
148 | </pre></div> Stop: <div class="fragment"><pre class="fragment"> timer.stop(); |
---|
149 | </pre></div> Get time: <div class="fragment"><pre class="fragment"> elapsedtime = timer.get_time(); |
---|
150 | </pre></div><p> |
---|
151 | It is possible to get elapsed time without stopping the timer. Observe that it is also possible to use the macros "time.tic();" to reset and start clock and "time.toc_print();" to print the elapsed time.<p> |
---|
152 | <dl class="warning" compact><dt><b>Warning:</b></dt><dd>May give an negative answer if the measured time is too long. </dd></dl> |
---|
153 | <hr>The documentation for this class was generated from the following files:<ul> |
---|
154 | <li><a class="el" href="timing_8h-source.html">timing.h</a><li><a class="el" href="timing_8cpp.html">timing.cpp</a></ul> |
---|
155 | </div> |
---|
156 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:19 2009 for mixpp by |
---|
157 | <a href="http://www.doxygen.org/index.html"> |
---|
158 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
159 | </body> |
---|
160 | </html> |
---|