mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-11-04 11:15:27 -07:00
libpgf: the time measurement in pgf-translate should be made after pgf_parse_result for more accurate timing
This commit is contained in:
1 parent
dcbeb63849
commit
4ddf24429b
1 file changed
+3
-3
@@ -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