Add time limits, use anyhow crate to improve error handling, remove depth limit on quiescence search
16 lines
284 B
Rust
16 lines
284 B
Rust
use std::time::Instant;
|
|
|
|
pub struct TimeInfo {
|
|
pub time: Instant,
|
|
pub remaining_time_in_ms: u128,
|
|
}
|
|
|
|
impl TimeInfo {
|
|
pub const fn new(time: Instant, remaining_time_in_ms: u128) -> Self {
|
|
Self {
|
|
time,
|
|
remaining_time_in_ms,
|
|
}
|
|
}
|
|
}
|