Check time limit once per 1024 nodes
This commit is contained in:
@@ -25,7 +25,7 @@ pub fn negamax(
|
||||
nodes: &mut u64,
|
||||
do_nmp: bool,
|
||||
) -> Result<i16> {
|
||||
if *nodes & 1024 == 0 && time.exceed_hard_limit() {
|
||||
if *nodes & 1023 == 0 && time.exceed_hard_limit() {
|
||||
bail!("Hard limit exceeded in negamax");
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ pub fn quiescence(
|
||||
time: &TimeInfo,
|
||||
nodes: &mut u64,
|
||||
) -> Result<i16> {
|
||||
if *nodes & 1024 == 0 && time.exceed_hard_limit() {
|
||||
if *nodes & 1023 == 0 && time.exceed_hard_limit() {
|
||||
bail!("Hard limit exceeded in quiescence");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user