Quote Originally Posted by killbill689 View Post
The value of start is also 0.On failure clock() returns -1 thus it did not failed. Is there another way to benchmark my function?
On Windows, QueryPerformanceFrequency() and QueryPerformanceCounter(). On Linux and similar, gettimeofday(). I think gettimeofday() works on OSX too but I'm not sure.

These functions have better resolution than clock().