C语言中如何计算时间差
#include <time.h> #include <stdio.h> int main() { time_t start ,end ; double cost; time(&start); sleep(1); time(&end); cost=difftime(end,start); printf("%f/n",cost); return 0; }
大悲无泪--大悟无言--大笑无声

浙公网安备 33010602011771号