討論串[問題] 關於clock()...
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者littleshan (我要加入劍道社!)時間16年前 (2009/10/06 06:54), 編輯資訊
0
0
0
內容預覽:
使用 clock() 得到的精確度很低. 你的程式至少要跑 0.01 秒以上 才看得出跑多久. 如果你需要更精確的數字. 在 Windows 上可以用 QueryPerformanceCounter. Linux 上可以用 clock_gettime. --. 發信站: 批踢踢實業坊(ptt.c

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者cg1132001 (Gashu)時間16年前 (2009/10/06 06:38), 編輯資訊
0
0
0
內容預覽:
我的作業要計算排序所花的時間. int main(). {. clock_t start, end;. double result;. initialize();. cout << "(1)" << endl. << "排序前:" << endl;. printArray();. start = c
(還有154個字)
首頁
上一頁
1
下一頁
尾頁