| 
					
				 | 
			
			
				@@ -1,5 +1,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <stdio.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <stdlib.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <time.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 typedef struct { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     int fitness; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -8,6 +9,12 @@ typedef struct { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 Square* squares; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+long getNanos() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    struct timespec t; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    clock_gettime(CLOCK_MONOTONIC, &t); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return t.tv_nsec + t.tv_sec * 1000000000L; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 int size = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 int population = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 int (*fitness)(int*) = NULL; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -213,6 +220,8 @@ int main(int argAmount, char** args) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         default: puts("unknown type"); return 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    long time = -getNanos(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     for(int h = 0; h < 5; h++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         init(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int half = population / 2; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -232,5 +241,8 @@ int main(int argAmount, char** args) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         print(squares); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    time += getNanos(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    printf("Millis: %lf\n", time / 1000000.0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |