SyntaxFix
Write A Post
Hire A Developer
Questions
clock() has a often a pretty lousy resolution. If you want to measure time at the millisecond level, one alternative is to use clock_gettime(), as explained in this question.
(Remember that you need to link with -lrt on Linux).