fol21 / benchmarker

An C implementation for benchmarking routines.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

benchmarker

An C implementation for benchmarking routines.

Como usar

#include <benchmark.h>
....

 typedef struct t_args {int seconds;} my_args;

 void routine(void* args)
 {
      // Your really long routine
      sleep(args->seconds);
 }
 
 ...
 int main()
 {
    my_args args = {1};
    long int time = (long int) ustopwatch(routine, &args);
    printf("Elapsed: %ld microseconds\n\n", time);
    
    return 0;
 }

About

An C implementation for benchmarking routines.

License:GNU General Public License v3.0


Languages

Language:C 100.0%