Changeset 591 for library/doc/html/timer.html
- Timestamp:
- 08/30/09 22:13:15 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/doc/html/timer.html
r590 r591 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"> 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 3 5 <title>mixpp: Using timers to measure execution time</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 --> 6 <link href="tabs.css" rel="stylesheet" type="text/css"/> 7 <link href="doxygen.css" rel="stylesheet" type="text/css"/> 8 </head> 9 <body> 10 <!-- Generated by Doxygen 1.6.1 --> 8 11 <script type="text/javascript"> 9 12 <!-- … … 60 63 </div> 61 64 <div class="contents"> 62 <h1><a class="anchor" name="timer">Using timers to measure execution time </a></h1>In this example we are using the Real_Timer class to measure the execution time of a simple program. The Real_Timer class is included in the itmisc library.<p> 65 66 67 <h1><a class="anchor" id="timer">Using timers to measure execution time </a></h1><p>In this example we are using the Real_Timer class to measure the execution time of a simple program. The Real_Timer class is included in the itmisc library.</p> 63 68 <div class="fragment"><pre class="fragment"><span class="preprocessor">#include <itpp/itbase.h></span> 64 69 … … 92 97 93 98 <span class="comment">//Print the result of the processing:</span> 94 cout << <span class="stringliteral"> "The sum of all integers from 0 to "</span> << N - 1 << <span class="stringliteral">" equals "</span> << sum << endl;99 cout << <span class="stringliteral">"The sum of all integers from 0 to "</span> << N - 1 << <span class="stringliteral">" equals "</span> << sum << endl; 95 100 96 101 <span class="comment">//Exit program:</span> … … 98 103 99 104 } 100 </pre></div><p> 101 When you run this program, the output will look something like this:<p> 105 </pre></div><p>When you run this program, the output will look something like this:</p> 102 106 <div class="fragment"><pre class="fragment">Elapsed time = 0.000797055 seconds 103 107 The sum of all integers from 0 to 999999 equals 1783293664 104 108 </pre></div> </div> 105 <hr size="1" ><address style="text-align: right;"><small>Generated on Sat Aug 29 20:49:422009 for mixpp by 109 <hr size="1"/><address style="text-align: right;"><small>Generated on Sun Aug 30 22:10:50 2009 for mixpp by 106 110 <a href="http://www.doxygen.org/index.html"> 107 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8</small></address>111 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> 108 112 </body> 109 113 </html>