9 Replies Latest reply on May 27, 2020 6:23 AM by BoTa_264741

    How to calculate time took by the psoc 5 chip for the instruction

      I have been trying to use clock () function to get the time used by code i have wrote. The code is in the main before infinite for loop.




      volatile clock_t start1,end1,;


      volatile float64 c_time;




      //then my code comes here


      end1= clock();


       c_time =( float) (end1- start1)/ (float)(CLOCKS_PER_SEC);




      when i debug the code and looks in the variables start1 and end1, it displays same value .


      is there any other way by which I can try to determine the time taken by my code.