File manager

Dependencies:   SDFileSystem

Dependents:   RwSDCard_Xml_GPS

Revision:
28:12c88b5e46e5
Parent:
27:b0eb0f36110e
Child:
29:964610d82f8d
--- a/FileManager.cpp	Thu May 26 15:23:26 2016 +0000
+++ b/FileManager.cpp	Thu May 26 15:54:19 2016 +0000
@@ -26,7 +26,9 @@
 DigitalOut ledStatus(NC);
 #endif
 
-
+#if CAPTURE_TIME
+Timer t;
+#endif
 /* ###############  Static function prototype  ################## */
 
 static void FILEMANAGER_RemoveSpaces(char* s , int size);
@@ -246,6 +248,10 @@
     } 
     else 
     {  
+        #if CAPTURE_TIME
+        t.reset();
+        t.start();
+        #endif
         /* Indicate LED Status (ON)*/
         FILEMANAGER_SetLedStatus(true);
         
@@ -262,6 +268,11 @@
         #if defined(__MICROLIB) && defined(__ARMCC_VERSION) // with microlib and ARM compiler
         free(fp);
         #endif
+        
+        #if CAPTURE_TIME
+        t.stop();
+        printf("\r\nThe GPS Write Log time taken was %d millsecond\n", t.read_ms());
+        #endif
     }
 }
 /**
@@ -322,6 +333,10 @@
         /* Indicate LED Status (ON)*/
         FILEMANAGER_SetLedStatus(true);
         
+        #if CAPTURE_TIME
+        t.reset();
+        t.start();
+        #endif
         /* Print some message for information */
         printf("\r\n Writing to Log File (%s)....",file_name);
 
@@ -342,6 +357,10 @@
         #if defined(__MICROLIB) && defined(__ARMCC_VERSION) // with microlib and ARM compiler
         free(fp);
         #endif
+        #if CAPTURE_TIME
+        t.stop();
+        printf("\r\n The RMS Write log time taken was %d milliseconds\n", t.read_ms());
+        #endif
     }
 }
 /**