I have a C code, When I try to calculate the time of small pieces of processing code for the first execution. It gives me 30 ms, when I turn of the exe file and run it again it gives me 1 ms, and this time is the time for calculation and each time I run the program the calculation values is different from the previous one, if I turn off the PC and turn it, it gives me 30 ms for the first execution and 1 ms for all other executions How can I get the same time , I free all the used memory and I run another program to overwrite the memory but the problem is not solved until I reboot the PC any help
start_time=clock();
Encryption();
end_time=clock();
cpu_time_used_totlal_enc +=(double) (end_time-start_time) / CLOCKS_PER_SEC;