[poppler] test: test-poppler.c,1.6,1.7
Jeff Muizelaar
jrmuizel at kemper.freedesktop.org
Wed Sep 6 20:20:44 PDT 2006
Update of /cvs/poppler/test
In directory kemper:/tmp/cvs-serv30475
Modified Files:
test-poppler.c
Log Message:
Report the amount of time the tests took.
Index: test-poppler.c
===================================================================
RCS file: /cvs/poppler/test/test-poppler.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- test-poppler.c 6 Sep 2006 23:28:53 -0000 1.6
+++ test-poppler.c 7 Sep 2006 03:20:42 -0000 1.7
@@ -1,5 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <sys/time.h>
+#include <time.h>
#include <poppler.h>
#include <glob.h>
#include "read-cache.h"
@@ -153,7 +155,12 @@
{
glob_t globbuf;
int i;
+ struct timeval start;
+ struct timeval end;
+ int total_secs;
g_type_init ();
+
+ gettimeofday(&start, NULL);
if (argc > 1) {
cache_init(argv[1]);
for (i=1; i<argc; i++) {
@@ -167,7 +174,10 @@
}
globfree(&globbuf);
}
+ gettimeofday(&end, NULL);
+ total_secs = (end.tv_sec - start.tv_sec);
+ printf("tests took %dmin %dsec\n", total_secs / 60, total_secs % 60);
return 0;
}
More information about the poppler
mailing list