Use GetTickCountDelta when possible
This commit is contained in:
@@ -2044,7 +2044,7 @@ bool GetIso14443aAnswerFromTag_Thinfilm(uint8_t *receivedResponse, uint8_t *rec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetTickCount() - receive_timer > 100)
|
if (GetTickCountDelta(receive_timer) > 100)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
*received_len = Demod.len;
|
*received_len = Demod.len;
|
||||||
@@ -2094,7 +2094,7 @@ static int GetIso14443aAnswerFromTag(uint8_t *receivedResponse, uint8_t *receive
|
|||||||
}
|
}
|
||||||
|
|
||||||
// timeout already in ms + 100ms guard time
|
// timeout already in ms + 100ms guard time
|
||||||
if (GetTickCount() - receive_timer > timeout + 100)
|
if (GetTickCountDelta(receive_timer) > timeout + 100)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -1106,7 +1106,7 @@ void Mifare1ksim(uint16_t flags, uint8_t exitAfterNReads, uint8_t *datain, uint1
|
|||||||
Dbprintf("[MFEMUL_AUTH1] AUTH COMPLETED for sector %d with key %c. time=%d",
|
Dbprintf("[MFEMUL_AUTH1] AUTH COMPLETED for sector %d with key %c. time=%d",
|
||||||
cardAUTHSC,
|
cardAUTHSC,
|
||||||
cardAUTHKEY == 0 ? 'A' : 'B',
|
cardAUTHKEY == 0 ? 'A' : 'B',
|
||||||
GetTickCount() - authTimer
|
GetTickCountDelta(authTimer)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
LED_C_ON();
|
LED_C_ON();
|
||||||
|
|||||||
Reference in New Issue
Block a user