词条 | difftime |
释义 | § 解释 函数名: difftime 功 能: 计算两个时刻之间的时间差 用 法: double difftime(time_t time2, time_t time1); § 程序例 #include <time.h> #include <stdio.h> #include <dos.h> #include <conio.h> int main(void) { time_t first, second; clrscr(); first = time(NULL); /* Gets system time */ delay(2000); /* Waits 2 secs */ second = time(NULL); /* Gets system time again */ printf("The difference is: %f \\ seconds\",difftime(second,first)); getch(); return 0; } |
随便看 |
百科全书收录594082条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。