mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-14 02:26:59 -07:00
Provide msclock() as Milliseconds timer for performance measures (#231)
- don't use clock(). It has different functionalities in Windows and Linux - move sleep functions to util.h
This commit is contained in:
parent
0ca9bc0e99
commit
acf0582d53
29 changed files with 162 additions and 150 deletions
|
@ -8,15 +8,19 @@
|
|||
// Commands related to the German electronic Identification Card
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "util.h"
|
||||
#include "cmdhfepa.h"
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include "util.h"
|
||||
#include "proxmark3.h"
|
||||
#include "ui.h"
|
||||
#include "cmdparser.h"
|
||||
#include "common.h"
|
||||
#include "cmdmain.h"
|
||||
#include "sleep.h"
|
||||
#include "cmdhfepa.h"
|
||||
|
||||
static int CmdHelp(const char *Cmd);
|
||||
|
||||
|
@ -37,7 +41,7 @@ int CmdHFEPACollectPACENonces(const char *Cmd)
|
|||
n = n > 0 ? n : 1;
|
||||
|
||||
PrintAndLog("Collecting %u %u-byte nonces", n, m);
|
||||
PrintAndLog("Start: %u", time(NULL));
|
||||
PrintAndLog("Start: %" PRIu64 , msclock()/1000);
|
||||
// repeat n times
|
||||
for (unsigned int i = 0; i < n; i++) {
|
||||
// execute PACE
|
||||
|
@ -64,7 +68,7 @@ int CmdHFEPACollectPACENonces(const char *Cmd)
|
|||
sleep(d);
|
||||
}
|
||||
}
|
||||
PrintAndLog("End: %u", time(NULL));
|
||||
PrintAndLog("End: %" PRIu64, msclock()/1000);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue