Oops, previous commit messed up POSIX timing code, now fixed.

[SVN r41359]
This commit is contained in:
John Maddock
2007-11-25 15:47:58 +00:00
parent 7015512292
commit 2995393609

View File

@ -324,17 +324,17 @@ int main(int argc, char**argv)
iters = 10;
tim = 1.1;
// cache load:
regex_tA(&r, s2.c_str(), nsubs, matches.get(), 0);
regexecA(&r, s2.c_str(), nsubs, matches.get(), 0);
do{
iters *= (tim > 0.001) ? (1.1/tim) : 100;
t.restart();
for(i = 0; i < iters; ++i)
{
result = regex_tA(&r, s2.c_str(), nsubs, matches.get(), 0);
result = regexecA(&r, s2.c_str(), nsubs, matches.get(), 0);
}
tim = t.elapsed();
}while(tim < wait_time);
cout << "POSIX regex_tA time: " << (tim * 1000000 / iters) << "us" << endl;
cout << "POSIX regexecA time: " << (tim * 1000000 / iters) << "us" << endl;
if(result == 0)
{