I\'m trying to find a way to get the execution time of a section of code in C. I\'ve already tried both time() and clock() from time.h, but it seems that time() returns seco
Don't know which enviroment/OS you are working on, but your timing may be inaccurate if another thread, task, or process preempts your timed code in the middle. I suggest exploring mechanisms such as mutexes or semaphores to prevent other threads from preemting your process.