Time fix #36

Merged
rektdie merged 4 commits from time_fix into main 2025-03-27 22:32:47 +01:00
Showing only changes of commit 960b32e6bd - Show all commits
+2 -2
View File
@@ -117,7 +117,7 @@ static int GetReductions(Board &board, Move &move, int depth, int moveSeen, int
} }
static SearchResults Quiescence(Board board, int alpha, int beta, int ply) { static SearchResults Quiescence(Board board, int alpha, int beta, int ply) {
if (!benchStarted) { if (!benchStarted && nodes % 1024 == 0) {
if (sw.GetElapsedMS() >= timeToSearch) { if (sw.GetElapsedMS() >= timeToSearch) {
StopSearch(); StopSearch();
return 0; return 0;
@@ -166,7 +166,7 @@ static SearchResults Quiescence(Board board, int alpha, int beta, int ply) {
template <bool isPV> template <bool isPV>
SearchResults PVS(Board board, int depth, int alpha, int beta, int ply) { SearchResults PVS(Board board, int depth, int alpha, int beta, int ply) {
if (!benchStarted) { if (!benchStarted && nodes % 1024 == 0) {
if (sw.GetElapsedMS() >= timeToSearch) { if (sw.GetElapsedMS() >= timeToSearch) {
StopSearch(); StopSearch();
return 0; return 0;