[問題] clock() 在afs上沒反應
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
Unix
問題(Question):
在本機上gcc出來結果是好的,都有正常的時間,但在afs上gcc就全都是零
預期的正確結果(Expected Output):
只要不是零
錯誤結果(Wrong Output):
零
程式碼(Code):(請善用置底文網頁, 記得排版)
clock_t start, end;
int i, count[1000];
double diff;
start = clock();
for(i=0;i<1000;i++){
count[i]=[i];
}
end = clock();
diff = end - start;
printf("%f", diff);
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 72.79.79.253
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1444629184.A.A86.html
→
10/12 20:16, , 1F
10/12 20:16, 1F
推
10/12 21:50, , 2F
10/12 21:50, 2F
→
10/12 21:50, , 3F
10/12 21:50, 3F
→
10/12 21:51, , 4F
10/12 21:51, 4F
→
10/12 21:52, , 5F
10/12 21:52, 5F
→
10/12 21:53, , 6F
10/12 21:53, 6F
→
10/13 11:16, , 7F
10/13 11:16, 7F
→
10/13 11:16, , 8F
10/13 11:16, 8F
→
10/13 11:17, , 9F
10/13 11:17, 9F
→
10/13 11:18, , 10F
10/13 11:18, 10F
推
10/14 00:03, , 11F
10/14 00:03, 11F
→
10/14 00:04, , 12F
10/14 00:04, 12F
→
10/14 00:04, , 13F
10/14 00:04, 13F
→
10/18 04:32, , 14F
10/18 04:32, 14F