New course! Every coder should learn Generative AI!
Try a free lesson+ 1
you can use clock_t
#include <time.h>
int main(void) {
clock_t tStart = clock();
/* Do your stuff here */
cout<< (double) (clock() - tStart)/CLOCKS_PER_SEC);
return 0;
}
try that !