From 976a83cd1eeb3107b1faeadc12a512a089262fd8 Mon Sep 17 00:00:00 2001 From: Quake4 Date: Thu, 21 Dec 2017 21:42:23 +0300 Subject: [PATCH] fix bench nohash timeout --- Code/Config.ps1 | 2 +- MindMiner.ps1 | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Code/Config.ps1 b/Code/Config.ps1 index 3d9dcc76..a84579a9 100644 --- a/Code/Config.ps1 +++ b/Code/Config.ps1 @@ -38,7 +38,7 @@ class Config : BaseConfig { static [int] $Processors = 0 static [int] $Cores = 0 static [int] $Threads = 0 - static [string] $Version = "v0.7" + static [string] $Version = "v0.8" static [string] $BinLocation = "Bin" static [eMinerType[]] $ActiveTypes = @([eMinerType]::CPU) static [string[]] $CPUFeatures diff --git a/MindMiner.ps1 b/MindMiner.ps1 index 66093868..91d51a38 100644 --- a/MindMiner.ps1 +++ b/MindMiner.ps1 @@ -314,8 +314,13 @@ while ($true) $FastLoop = $true } # benchmark time reached - exit from loop - elseif ($_.Action -eq [eAction]::Benchmark -and $_.CurrentTime.Elapsed.TotalSeconds -ge $_.Miner.BenchmarkSeconds -and $_.GetSpeed() -gt 0) { - $FastLoop = $true + elseif ($_.Action -eq [eAction]::Benchmark) { + $speed = $_.GetSpeed() + if (($_.CurrentTime.Elapsed.TotalSeconds -ge $_.Miner.BenchmarkSeconds -and $speed -gt 0) -or + ($_.CurrentTime.Elapsed.TotalSeconds -ge ($_.Miner.BenchmarkSeconds * 2) -and $speed -eq 0)) { + $FastLoop = $true + } + Remove-Variable speed } } } while ($Config.LoopTimeout -gt $Summary.LoopTime.Elapsed.TotalSeconds -and !$FastLoop)