02 September 2018 12:28:44 PM TIMER_CLOCK C version Demonstrate the use of the CLOCK timer. CLOCK is a standard C library routine (defined in time.h) It returns the processor time used by the program since the beginning of program execution. Divide this by CLOCKS_PER_SEC to convert to seconds. CLOCK is a crude timer, and results less than a tenth of a second are probably not reliable. The number of clock ticks per second is 1000000 TEST01 Time the C RAND routine by computing N values. For a given N, repeat the computation 5 times. Data vectors will be of minimum size 1024 Data vectors will be of maximum size 1048756 CPU times are in seconds. N Rep #1 Rep #2 Rep #2 Rep #4 Rep #5 1024 x[0] = 1804289383 0.000009 x[0] = 386839851 0.000007 x[0] = 279527351 0.000006 x[0] = 1662919361 0.000007 x[0] = 1397401777 0.000007 2048 x[0] = 1891292515 0.000014 x[0] = 361520407 0.000012 x[0] = 1344992371 0.000013 x[0] = 419186726 0.000012 x[0] = 907339252 0.000013 4096 x[0] = 745712158 0.000027 x[0] = 116276305 0.000025 x[0] = 1531392060 0.000025 x[0] = 1758050055 0.000025 x[0] = 1135992855 0.000026 8192 x[0] = 358951894 0.000053 x[0] = 1272174340 0.000050 x[0] = 496561661 0.000050 x[0] = 2134878203 0.000050 x[0] = 869212447 0.000050 16384 x[0] = 791496463 0.000107 x[0] = 350615169 0.000098 x[0] = 1049613479 0.000100 x[0] = 2009662218 0.000099 x[0] = 2114718887 0.000099 32768 x[0] = 543828801 0.000212 x[0] = 1459138466 0.000199 x[0] = 989964655 0.000198 x[0] = 745636671 0.000199 x[0] = 675259397 0.000199 65536 x[0] = 608043060 0.000503 x[0] = 1397237622 0.000401 x[0] = 1493915180 0.000400 x[0] = 142574706 0.000399 x[0] = 1161560675 0.000412 131072 x[0] = 1899087921 0.000857 x[0] = 270842687 0.001108 x[0] = 452964975 0.000986 x[0] = 1456711665 0.000866 x[0] = 748455220 0.000867 262144 x[0] = 405118908 0.001904 x[0] = 844041136 0.001762 x[0] = 716498184 0.001744 x[0] = 2049438716 0.001761 x[0] = 1753313355 0.001731 524288 x[0] = 707539627 0.003827 x[0] = 1705391276 0.003529 x[0] = 672048454 0.003516 x[0] = 1327769184 0.003527 x[0] = 32459967 0.003437 1048576 x[0] = 365276336 0.007368 x[0] = 1614963815 0.006808 x[0] = 1532220195 0.006793 x[0] = 798196474 0.006749 x[0] = 411303290 0.006742 TIMER_CLOCK Normal end of execution. 02 September 2018 12:28:44 PM