mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-22 13:10:43 +08:00
fix: overflow was possible since 1000 is type long
This commit is contained in:
parent
ef9d1fa378
commit
1b64c4cb63
1 changed files with 1 additions and 1 deletions
|
@ -130,7 +130,7 @@ uint64_t msclock(void) {
|
|||
#else
|
||||
struct timespec t;
|
||||
clock_gettime(CLOCK_MONOTONIC, &t);
|
||||
return (t.tv_sec * 1000 + t.tv_nsec / 1000000);
|
||||
return ( 1000 * (uint64_t)t.tv_sec + t.tv_nsec / 1000000);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue