1
0
Fork 0

DBG: call reference update less frequently

This commit is contained in:
Duncan Ogilvie 2020-02-10 02:59:08 +01:00
parent aac246b27f
commit 1774ba1f89
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 4 additions and 2 deletions

View File

@ -196,11 +196,13 @@ int RefFindInRange(duint scanStart, duint scanSize, CBREF Callback, void* UserDa
if(initCallBack)
Callback(0, 0, &refInfo);
auto percentCount = scanSize / 500;
//concurrency::parallel_for(duint (0), scanSize, [&](duint i)
for(duint i = 0; i < scanSize;)
{
// Print the progress every 4096 bytes
if((i % 0x1000) == 0)
// Print the progress every percent
if((i % percentCount) == 0)
{
// Percent = (current / total) * 100
// Integer = floor(percent)