FIX: time printing, like difftime in MINGW enviroments needs to use 32b time.

This commit is contained in:
iceman1001 2016-04-23 13:02:20 +02:00
commit be6e909c5b
5 changed files with 8 additions and 4 deletions

View file

@ -1230,10 +1230,10 @@ int CmdHF14AMfChk(const char *Cmd) {
t1 = clock() - t1;
time(&end);
unsigned long elapsed_time = difftime(end, start);
if ( t1 > 0 )
printf("\nTime in checkkeys: %.0f ticks %u seconds\n", (float)t1, elapsed_time);
PrintAndLog("\nTime in checkkeys: %.0f ticks %u seconds\n", (float)t1, elapsed_time);
// 20160116 If Sector A is found, but not Sector B, try just reading it of the tag?
if ( keyType != 1 ) {
PrintAndLog("testing to read key B...");

View file

@ -12,6 +12,10 @@
#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

View file

@ -37,7 +37,6 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>

View file

@ -10,6 +10,7 @@
#ifndef UI_H__
#define UI_H__
#define _USE_MATH_DEFINES
#include <stdarg.h>
#include <stdlib.h>

View 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