Changeset 651 for library/doc/html/timer.html
- Timestamp:
- 10/12/09 13:49:39 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/doc/html/timer.html
r641 r651 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"/> 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"> 5 3 <title>mixpp: Using timers to measure execution time</title> 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 --> 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.9 --> 11 8 <script type="text/javascript"> 12 9 <!-- … … 63 60 </div> 64 61 <div class="contents"> 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> 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> 68 63 <div class="fragment"><pre class="fragment"><span class="preprocessor">#include <itpp/itbase.h></span> 69 64 … … 97 92 98 93 <span class="comment">//Print the result of the processing:</span> 99 cout << <span class="stringliteral"> "The sum of all integers from 0 to "</span> << N - 1 << <span class="stringliteral">" equals "</span> << sum << endl;94 cout << <span class="stringliteral">"The sum of all integers from 0 to "</span> << N - 1 << <span class="stringliteral">" equals "</span> << sum << endl; 100 95 101 96 <span class="comment">//Exit program:</span> … … 103 98 104 99 } 105 </pre></div><p>When you run this program, the output will look something like this:</p> 100 </pre></div><p> 101 When you run this program, the output will look something like this:<p> 106 102 <div class="fragment"><pre class="fragment">Elapsed time = 0.000797055 seconds 107 103 The sum of all integers from 0 to 999999 equals 1783293664 108 104 </pre></div> </div> 109 <hr size="1" /><address style="text-align: right;"><small>Generated on Sun Sep 27 00:49:05 2009 for mixpp by 105 <hr size="1"><address style="text-align: right;"><small>Generated on Wed Oct 7 17:34:45 2009 for mixpp by 110 106 <a href="http://www.doxygen.org/index.html"> 111 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1</small></address>107 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> 112 108 </body> 113 109 </html>