mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-19 11:33:51 +08:00
Merge pull request #302 from cjbrigato/patch-1
Off by one in GetTickCountDelta (FIXes #301)
This commit is contained in:
commit
da815d7416
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ uint32_t RAMFUNC GetTickCount(void) {
|
|||
|
||||
uint32_t RAMFUNC GetTickCountDelta(uint32_t start_ticks) {
|
||||
uint32_t stop_ticks = AT91C_BASE_RTTC->RTTC_RTVR;
|
||||
if (stop_ticks > start_ticks)
|
||||
if (stop_ticks >= start_ticks)
|
||||
return stop_ticks - start_ticks;
|
||||
return (UINT32_MAX - start_ticks) + stop_ticks;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue