Skip to content

Commit

Permalink
fix bench nohash timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Quake4 committed Dec 21, 2017
1 parent ef1bedc commit 976a83c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Code/Config.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions MindMiner.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 976a83c

Please sign in to comment.