mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
libpgf: the time measurement in pgf-translate should be made after pgf_parse_result for more accurate timing
This commit is contained in:
@@ -129,14 +129,14 @@ int main(int argc, char* argv[]) {
|
||||
tok = strtok(NULL, " \n");
|
||||
}
|
||||
|
||||
// Now begin enumerating the resulting syntax trees
|
||||
GuEnum* result = pgf_parse_result(parse, ppool);
|
||||
|
||||
clock_t end = clock();
|
||||
|
||||
double cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC;
|
||||
printf("%.2f sec\n", cpu_time_used);
|
||||
|
||||
// Now begin enumerating the resulting syntax trees
|
||||
GuEnum* result = pgf_parse_result(parse, ppool);
|
||||
|
||||
while (true) {
|
||||
PgfExpr expr = gu_next(result, PgfExpr, ppool);
|
||||
// The enumerator will return a null variant at the
|
||||
|
||||
Reference in New Issue
Block a user