I am using clock() in C Run time library to get processor cycles. In driver, CYCLES and CYCLES2 are also used to get the cycles directly.
In very rare cases, I found the cycles could be small than the value should be. Sometimes it is halved, not always.
My questions: Is there any settings or application rule for the reading of CYCLES and CYCLES2 (clock() also read these registers) ?