Hello, I was wondering if someone could help point me in the right direction… (if there is one) I have a function that needs to test how many clock cycles it takes to execute a function. (I am using c# but can use anything else.) … are any of the below possible…
- disable interrupts on a system. (this does not seem possible with xp/vista) (I understand that this is not safe.)
- If i could get the OS to give me a guaranteed full time slice. If the function is small it can be timed without interruption or if the function where larger then different parts of the function could be run on different time-slices and then the times can be added.
- If I could somehow ketch the CPU counter when it is preempted. I would then have different lengths that I could add it up.