summaryrefslogtreecommitdiff
path: root/meme
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2014-09-12 12:20:28 -0300
committerWerner Almesberger <werner@almesberger.net>2014-09-12 12:20:28 -0300
commit4bf74ea8830dad30563b77143da0c7c57ae03a01 (patch)
tree389c3d335141adceae536c2011202c84b8e6cb26 /meme
parent60c8902fe151eb4b87796badf68eb3bea60cf58e (diff)
downloadmisc-4bf74ea8830dad30563b77143da0c7c57ae03a01.tar.gz
misc-4bf74ea8830dad30563b77143da0c7c57ae03a01.tar.bz2
misc-4bf74ea8830dad30563b77143da0c7c57ae03a01.zip
meme/main.c (main): measure time to load the STL file
Diffstat (limited to 'meme')
-rw-r--r--meme/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/meme/main.c b/meme/main.c
index 9e42adc..eccd692 100644
--- a/meme/main.c
+++ b/meme/main.c
@@ -14,6 +14,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include "time.h"
#include "mesh.h"
#include "stl.h"
@@ -30,14 +31,20 @@ static void usage(const char *name)
int main(int argc, char **argv)
{
+ struct time t_load;
+
switch (argc) {
case 1:
+ time_start(&t_load);
stl_load(stdin);
+ time_stop(&t_load);
break;
default:
usage(*argv);
}
+ fprintf(stderr, "STL loaded in %.3f s\n", time_ms(&t_load)/1000.0);
+
gui();
{
const struct edge *e;