• <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
            <2011年1月>
            2627282930311
            2345678
            9101112131415
            16171819202122
            23242526272829
            303112345

            享受編程

            常用鏈接

            留言簿(11)

            隨筆分類(159)

            隨筆檔案(224)

            文章分類(2)

            文章檔案(4)

            經典c++博客

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            MSDN clock

            經常忘記寫一下:

            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 漂漂 閱讀(950) 評論(0)  編輯 收藏 引用 所屬分類: 轉載經典文章
            久久婷婷五月综合成人D啪| 91精品国产高清91久久久久久| 成人a毛片久久免费播放| 91精品国产高清久久久久久91| 国产日韩久久久精品影院首页| 久久精品国产清自在天天线| 久久精品国产99久久无毒不卡 | 久久久无码精品午夜| 久久人人爽人人爽人人av东京热| 久久精品国产精品青草app| 亚洲欧洲久久久精品| 99国内精品久久久久久久| 久久伊人五月丁香狠狠色| 国产精品欧美久久久久无广告| 久久婷婷国产剧情内射白浆| 99久久精品免费观看国产| 久久综合给久久狠狠97色| 久久综合成人网| 国产一区二区三精品久久久无广告 | 国产精品一区二区久久| 狠狠色丁香久久婷婷综合_中 | 久久这里只有精品首页| 久久亚洲高清综合| 成人综合久久精品色婷婷| 人妻无码久久精品| 性欧美丰满熟妇XXXX性久久久| 精品久久人妻av中文字幕| 久久精品成人免费看| 国产精品99久久久精品无码| 国产精品18久久久久久vr | 色婷婷综合久久久久中文字幕| 久久91精品国产91久久小草| 囯产精品久久久久久久久蜜桃| 久久无码av三级| 99精品久久精品| 人妻精品久久久久中文字幕一冢本| 久久久高清免费视频| 日产精品久久久久久久| 精品人妻伦九区久久AAA片69| 久久伊人五月丁香狠狠色| 五月丁香综合激情六月久久|