timesys.cc
来自「c++编写的并行拉马克遗传算法的程序。实现分析对接程序」· CC 代码 · 共 34 行
CC
34 行
/* timesys.cc */#ifdef sgi #include <stdio.h> #include <unistd.h> #include "timesys.h"#else extern "C" { #include <stdio.h> #include <unistd.h> #include "timesys.h" }#endifextern FILE *logFile;extern float idct;/*----------------------------------------------------------------------------*/void timesys( Clock duration, struct tms *start, struct tms *end )/*----------------------------------------------------------------------------*/{ fprintf( logFile, "Real= %.2f, CPU= %.2f, System= %.2f\n", (float)duration * idct, (float)(end->tms_utime - start->tms_utime) * idct, (float)(end->tms_stime - start->tms_stime) * idct );}/* EOF */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?