skeleton updated
authorMart Lubbers <mart@martlubbers.net>
Wed, 23 Mar 2016 11:21:21 +0000 (12:21 +0100)
committerMart Lubbers <mart@martlubbers.net>
Wed, 23 Mar 2016 11:21:21 +0000 (12:21 +0100)
modelchecker/main.c

index 76f5e95..c439d30 100644 (file)
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <stdbool.h>
 #include <ctype.h>
+#include <time.h>
 
 #include <sylvan.h>
 #include "mc.h"
@@ -33,20 +34,26 @@ void usage(char *prg){
 }
 
 void solve(FILE *inputstream){
+       clock_t time_start, time_file_read;
        int buffer;
+
+       time_start = clock();
        while((buffer = fgetc(inputstream)) != EOF){
                printf("%c", buffer);
+               // Alex:
+               // Screen reading
+               // - Removing outside walls
+               // - Bucket fill
+               // - [tile]
+               // - tile = structure {int, int, enumtile}
        }
-       // Alex:
-       // Screen reading
-       // - Removing outside walls
-       // - Bucket fill
-       // - [tile]
-       // - tile = structure {int, int, enumtile}
+       time_file_read = clock();
 
        // Both: Encoding in both schemes
        
        // Future: SMC
+       fprintf(stderr, "CPU time taken: %fs\n",
+               ((double) (time_file_read-time_start))/CLOCKS_PER_SEC);
 }
 
 int main(int argc, char **argv){