diff options
| author | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
| commit | 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch) | |
| tree | 158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/c/chrono%2Fclock_t.html | |
| parent | 9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff) | |
| download | dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip | |
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/c/chrono%2Fclock_t.html')
| -rw-r--r-- | devdocs/c/chrono%2Fclock_t.html | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/devdocs/c/chrono%2Fclock_t.html b/devdocs/c/chrono%2Fclock_t.html deleted file mode 100644 index 5946393a..00000000 --- a/devdocs/c/chrono%2Fclock_t.html +++ /dev/null @@ -1,37 +0,0 @@ - <h1 id="firstHeading" class="firstHeading">clock_t</h1> <table class="t-dcl-begin"> <tr class="t-dsc-header"> <th> Defined in header <code><time.h></code> </th> <th> </th> <th> </th> </tr> <tr class="t-dcl"> <td class="t-dcl-nopad"> <pre data-language="c">typedef /* unspecified */ clock_t;</pre> -</td> <td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> </table> <p><span class="t-rev-inl t-until-c11"><span>Arithmetic</span><span><span class="t-mark-rev t-until-c11">(until C11)</span></span></span><span class="t-rev-inl t-since-c11"><span>Real</span><span><span class="t-mark-rev t-since-c11">(since C11)</span></span></span> type capable of representing the processor time used by a process. It has implementation-defined range and precision.</p> -<h3 id="Example"> Example</h3> <div class="t-example"> <div class="c source-c"><pre data-language="c">#include <stdio.h> -#include <time.h> -#include <math.h> - -volatile double sink; -int main (void) -{ - clock_t start = clock(); - - for(size_t i=0; i<3141592; ++i) - sink+=sin(i); - - clock_t end = clock(); - double cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC; - - printf("for loop took %f seconds to execute \n", cpu_time_used); -}</pre></div> <p>Possible output:</p> -<div class="text source-text"><pre data-language="c">for loop took 0.271828 seconds to execute</pre></div> </div> <h3 id="References"> References</h3> <ul> -<li> C17 standard (ISO/IEC 9899:2018): </li> -<ul><li> 7.27.1/3 Components of time (p: 284) </li></ul> -<li> C11 standard (ISO/IEC 9899:2011): </li> -<ul><li> 7.27.1/3 Components of time (p: 388) </li></ul> -<li> C99 standard (ISO/IEC 9899:1999): </li> -<ul><li> 7.23.1/3 Components of time (p: 338) </li></ul> -<li> C89/C90 standard (ISO/IEC 9899:1990): </li> -<ul><li> 4.12.1 Components of time </li></ul> -</ul> <h3 id="See_also"> See also</h3> <table class="t-dsc-begin"> <tr class="t-dsc"> <td> <div><a href="clock" title="c/chrono/clock"> <span class="t-lines"><span>clock</span></span></a></div> </td> <td> returns raw processor clock time since the program is started <br> <span class="t-mark">(function)</span> </td> -</tr> <tr class="t-dsc"> <td> <div><a href="clocks_per_sec" title="c/chrono/CLOCKS PER SEC"> <span class="t-lines"><span>CLOCKS_PER_SEC</span></span></a></div> </td> <td> number of processor clock ticks per second <br> <span class="t-mark">(macro constant)</span> </td> -</tr> <tr class="t-dsc"> <td colspan="2"> <span><a href="https://en.cppreference.com/w/cpp/chrono/c/clock_t" title="cpp/chrono/c/clock t">C++ documentation</a></span> for <code>clock_t</code> </td> -</tr> </table> <div class="_attribution"> - <p class="_attribution-p"> - © cppreference.com<br>Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.<br> - <a href="https://en.cppreference.com/w/c/chrono/clock_t" class="_attribution-link">https://en.cppreference.com/w/c/chrono/clock_t</a> - </p> -</div> |
