• <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年5月>
            24252627282930
            1234567
            891011121314
            15161718192021
            22232425262728
            2930311234

            享受編程

            常用鏈接

            留言簿(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 漂漂 閱讀(942) 評論(0)  編輯 收藏 引用 所屬分類: 轉載經典文章
            国产产无码乱码精品久久鸭| 亚洲国产成人精品女人久久久 | 奇米综合四色77777久久| 国产精品美女久久久久久2018| 狠狠干狠狠久久| 久久这里的只有是精品23| 一本久道久久综合狠狠爱| 亚洲国产精品久久久久久| 久久久久久久综合综合狠狠| 奇米综合四色77777久久| 日韩欧美亚洲综合久久影院d3| 亚洲?V乱码久久精品蜜桃| 久久精品国产网红主播| 色99久久久久高潮综合影院| 俺来也俺去啦久久综合网| 亚洲国产成人精品无码久久久久久综合 | 97精品国产91久久久久久| 久久久久亚洲AV无码去区首| 亚洲国产精品一区二区久久hs| 久久久久久青草大香综合精品| 久久成人影院精品777| 亚洲精品乱码久久久久久久久久久久| 色综合合久久天天综合绕视看| 久久人人妻人人爽人人爽| 要久久爱在线免费观看| 欧美午夜A∨大片久久| Xx性欧美肥妇精品久久久久久| 国内精品人妻无码久久久影院| 国产偷久久久精品专区| 久久久久久久综合狠狠综合| 色播久久人人爽人人爽人人片aV | 久久久久久国产a免费观看黄色大片 | 久久久久亚洲AV无码麻豆| 久久久久99这里有精品10 | 99久久婷婷免费国产综合精品| 久久亚洲AV成人无码软件 | 久久亚洲AV成人出白浆无码国产 | 日韩精品久久久久久久电影蜜臀| 亚洲人成无码久久电影网站| 香蕉久久永久视频| 国内精品久久久久影院老司|