Updated by Alexander Shishkov about 13 years ago

Environment details: Linux x86, gcc version 4.4.3, OpenCV [[OpenCV]] 2.2.0

http://linux.die.net/man/3/clock

"Note that the time can wrap around. On a 32bit system where CLOCKS_PER_SEC equals 1000000 this function will return the same value approximately every 72 minutes."

This means, I believe, that after a process has used enough processor time, there is a possibility that subsequent calls to clock() and comparison of their return values does not give a proper indication of elapsed processor time.

In openCVroot/modules/flann/include/opencv2/timer.h::StartStopTimer clock() is used for this purpose, and in this case the difference between processor times is cast to a double. This can result in a negative value, and leads to a misbehaving while loop in openCVroot/modules/flann/include/opencv2/index_testing.h::search_with_ground_truth

Back