Skip to content

Instantly share code, notes, and snippets.

@pchaigno
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pchaigno/9682931 to your computer and use it in GitHub Desktop.
Save pchaigno/9682931 to your computer and use it in GitHub Desktop.
Execution time computation on yacc
#include <time.h>
clock_t begin, end;
double time_spent;
begin = clock();
yyin=fp;
yyparse();
fclose(fp);
end = clock();
time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment