]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
FIX: time printing, like difftime in MINGW enviroments needs to use 32b time.
authoriceman1001 <iceman@iuse.se>
Sat, 23 Apr 2016 11:02:20 +0000 (13:02 +0200)
committericeman1001 <iceman@iuse.se>
Sat, 23 Apr 2016 11:02:20 +0000 (13:02 +0200)
client/cmdhfmf.c
client/proxmark3.h
client/uart.h
client/ui.h
client/util.h

index 2e1b2186c07d6a411499b0af84b6786cd3bff331..0e3024a07623ed9204203f2fc78b4dd7b4529b57 100644 (file)
@@ -1230,10 +1230,10 @@ int CmdHF14AMfChk(const char *Cmd) {
        t1 = clock() - t1;\r
        time(&end);\r
        unsigned long elapsed_time = difftime(end, start);      \r
-\r
        if ( t1 > 0 )\r
-               printf("\nTime in checkkeys: %.0f ticks %u seconds\n", (float)t1, elapsed_time);\r
+               PrintAndLog("\nTime in checkkeys: %.0f ticks %u seconds\n", (float)t1, elapsed_time);\r
 \r
+               \r
        // 20160116 If Sector A is found, but not Sector B,  try just reading it of the tag?\r
        if ( keyType != 1 ) {\r
                PrintAndLog("testing to read key B...");\r
index 6665b75b7a313eb038657c2d921be36cc1bce742..89cac87818253e6122fc9fa3f0071dff161abe8f 100644 (file)
 #ifndef PROXMARK3_H__
 #define PROXMARK3_H__
 
+#ifdef __WIN32
+// for MINGW32 environments
+   #define _USE_32BIT_TIME_T 1
+#endif   
 #define __STDC_FORMAT_MACROS 1
 #include <inttypes.h>
 #define lx  PRIx32
index 747c0f26a3ee34e0d1fd60c2b6a2bc991e4b2f56..d520e7f4bb031644d2dae1393d75b730bb957d7c 100644 (file)
@@ -37,7 +37,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-
 #include <stdint.h>
 #include <stdbool.h>
 
index b5133ab424ada438e24f74bf16501f5331f4c2c5..3417f3629230263ff1fb2cb4a8b0b983b0ab407f 100644 (file)
@@ -10,6 +10,7 @@
 
 #ifndef UI_H__
 #define UI_H__
+
 #define _USE_MATH_DEFINES
 #include <stdarg.h>
 #include <stdlib.h>
index 22156db998ad7084f093cbc088c7ca2c66e94bbe..e492fd494f4f80ee8c4468d2b965f205199752fd 100644 (file)
@@ -13,7 +13,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
-#include <time.h>
+#include <time.h> 
 #include "data.h"    //for FILE_PATH_SIZE
 
 #ifndef ROTR
Impressum, Datenschutz