|
-
January 6th, 2012, 09:28 AM
#5
Re: problem with clock()
 Originally Posted by killbill689
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().
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|