• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆 - 224  文章 - 41  trackbacks - 0
            <2025年6月>
            25262728293031
            1234567
            891011121314
            15161718192021
            22232425262728
            293012345

            享受編程

            常用鏈接

            留言簿(11)

            隨筆分類(159)

            隨筆檔案(224)

            文章分類(2)

            文章檔案(4)

            經(jīng)典c++博客

            搜索

            •  

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            MSDN clock

            經(jīng)常忘記寫一下:

            Example

            /* CLOCK.C: This example prompts for how long
            * the program is to run and then continuously
            * displays the elapsed time for that period.
            */
            #include <stdio.h>
            #include <stdlib.h>
            #include <time.h>
            void sleep( clock_t wait );
            void main( void )
            {
              long    i = 600000L;
              clock_t start, finish;
              double  duration;
              /* Delay for a specified time. */
              printf( "Delay for three seconds\n" );
              sleep( (clock_t)3 * CLOCKS_PER_SEC );
              printf( "Done!\n" );
              /* Measure the duration of an event. */
              printf( "Time to do %ld empty loops is ", i );
              start = clock();
              while( i-- )
                 ;
              finish = clock();
              duration = (double)(finish - start) / CLOCKS_PER_SEC;
              printf( "%2.1f seconds\n", duration );
            }
            /* Pauses for a specified number of milliseconds. */
            void sleep( clock_t wait )
            {
              clock_t goal;
              goal = wait + clock();
              while( goal > clock() )
                 ;
            }
            

            Output

            Delay for three seconds
            Done!
            Time to do 600000 empty loops is 0.1 seconds
            

             

            posted on 2009-02-26 15:31 漂漂 閱讀(942) 評(píng)論(0)  編輯 收藏 引用 所屬分類: 轉(zhuǎn)載經(jīng)典文章
            99久久免费只有精品国产| 久久精品国产亚洲沈樵| 色综合久久天天综线观看| 伊人色综合久久天天网| 午夜精品久久久久久影视riav| 国产成人久久精品一区二区三区| 久久久久久久久久久精品尤物 | 久久人妻少妇嫩草AV无码专区| 久久久久亚洲AV无码永不| 日本一区精品久久久久影院| 模特私拍国产精品久久| 久久久久久久99精品免费观看| 亚洲午夜无码久久久久小说| 久久99国产乱子伦精品免费| 久久久人妻精品无码一区| 精品久久香蕉国产线看观看亚洲 | 亚洲中文字幕伊人久久无码| 久久精品一本到99热免费| 人妻中文久久久久| 成人午夜精品久久久久久久小说| 国色天香久久久久久久小说| 久久精品国产99久久香蕉| 久久av无码专区亚洲av桃花岛| 青青热久久国产久精品| 26uuu久久五月天| 国产精品福利一区二区久久| 亚洲AV日韩AV天堂久久| 亚洲欧美久久久久9999| 久久精品免费大片国产大片| 国产一区二区三区久久精品| 久久香蕉超碰97国产精品| 久久久久亚洲精品日久生情| 久久综合狠狠综合久久97色| 久久精品三级视频| 久久精品国产精品亚洲下载| 日韩精品久久久久久| 久久国产精品久久久| 久久精品国产99国产电影网| 国产精品九九久久免费视频 | 国产精品久久久久…| 97久久精品午夜一区二区|