来源:姥姥的数据结构课程 我们测试一个函数的运行时间时,就需要用到下面这套模板。 基本程序 #include<stdio.h> #include<time.h> clock_t start, stop; double duration;//记录被测函数运行时间,以s为单位 int main() { start = clock