Skip to content

Instantly share code, notes, and snippets.

@Y4suyuki
Last active December 13, 2015 20:38
Show Gist options
  • Save Y4suyuki/4971337 to your computer and use it in GitHub Desktop.
Save Y4suyuki/4971337 to your computer and use it in GitHub Desktop.
time my function in C.
#include <stdio.h>
#include <time.h>
int main()
{
clock_t tic = clock();
my_func();
clock_t toc = clock();
printf("%f seconds\n", (double)(toc - tic) / CLOCKS_PER_SEC);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment