[Compbench-devel] CompBenchmarks++/SupportedBenchmarks Benchmark-BENCHPPLINUX.cpp, 1.10, 1.11
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-05-07 20:06:54
|
Update of /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv4870 Modified Files: Benchmark-BENCHPPLINUX.cpp Log Message: Time measured up to microseconds. Index: Benchmark-BENCHPPLINUX.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BENCHPPLINUX.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Benchmark-BENCHPPLINUX.cpp 25 Jan 2007 15:38:19 -0000 1.10 --- Benchmark-BENCHPPLINUX.cpp 7 May 2007 20:06:38 -0000 1.11 *************** *** 285,290 **** std::string cmd; std::string result; ! time_t begint; ! time_t endt; double it; char dum[16] = { 0 }; --- 285,289 ---- std::string cmd; std::string result; ! double endt; double it; char dum[16] = { 0 }; *************** *** 301,311 **** cmd+=" -f3 -d':')"; ! begint=System()->Time(); if (System()->exec(cmd, result)==0) { System()->Chomp(result); it=atof(result.c_str()); ! endt=System()->Time(); ! if (endt>begint) { ! sprintf(dum, "%0.0f", it/(endt-begint)); result=dum; return(result); --- 300,310 ---- cmd+=" -f3 -d':')"; ! System()->startTimer(); if (System()->exec(cmd, result)==0) { System()->Chomp(result); it=atof(result.c_str()); ! endt=System()->endTimer(); ! if (endt>0) { ! sprintf(dum, "%0.0f", it/endt); result=dum; return(result); |