jueves, 9 de junio de 2022

Tic Toc in C - Execution time of C program

Tic Toc in C - Execution time of C program

//https://stackoverflow.com/questions/5248915/execution-time-of-c-program

#include <time.h>
#include <stdio.h>

int main()
{
    clock_t tic = clock();

    my_expensive_function_which_can_spawn_threads();

    clock_t toc = clock();

    printf("Elapsed: %f seconds\n", (double)(toc - tic) / CLOCKS_PER_SEC);

    return 0;
}

No hay comentarios:

Publicar un comentario