Rev 154 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 154 | Rev 156 | ||
|---|---|---|---|
| Line 113... | Line 113... | ||
| 113 | * time has been used so far. * |
113 | * time has been used so far. * |
| 114 | * * |
114 | * * |
| 115 | ************************************************************ |
115 | ************************************************************ |
| 116 | */ |
116 | */ |
| 117 | time_used = (ReadClock() - start_time); |
117 | time_used = (ReadClock() - start_time); |
| 118 | if (time_used >= noise_level && display_options & 16 && time_used > burp) { |
118 | if (time_used >= (int) noise_level && display_options & 16 && time_used > burp) { // Pierre-Marie Baty -- added type cast |
| 119 | Lock(lock_io); |
119 | Lock(lock_io); |
| 120 | if (pondering) |
120 | if (pondering) |
| 121 | printf(" %2i %s%7s? ", iteration, Display2Times(time_used), |
121 | printf(" %2i %s%7s? ", iteration, Display2Times(time_used), |
| 122 | tree->remaining_moves_text); |
122 | tree->remaining_moves_text); |
| 123 | else |
123 | else |
| Line 303... | Line 303... | ||
| 303 | tc_moves_remaining[root_wtm] * tc_increment) |
303 | tc_moves_remaining[root_wtm] * tc_increment) |
| 304 | / tc_moves_remaining[root_wtm]; |
304 | / tc_moves_remaining[root_wtm]; |
| 305 | if (surplus < tc_safety_margin) |
305 | if (surplus < tc_safety_margin) |
| 306 | time_limit = (average < simple_average) ? average : simple_average; |
306 | time_limit = (average < simple_average) ? average : simple_average; |
| 307 | else |
307 | else |
| 308 | time_limit = |
308 | time_limit = (int) // Pierre-Marie Baty -- added type cast |
| 309 | (average < 2.0 * simple_average) ? average : 2.0 * simple_average; |
309 | ((average < 2.0 * simple_average) ? average : 2.0 * simple_average); |
| 310 | } |
310 | } |
| 311 | if (tc_increment > 200 && moves_out_of_book < 2) |
311 | if (tc_increment > 200 && moves_out_of_book < 2) |
| 312 | time_limit * |
312 | time_limit = (int) (time_limit * 1.2); // Pierre-Marie Baty -- added type cast |
| 313 | if (time_limit <= 0) |
313 | if (time_limit <= 0) |
| 314 | time_limit = 5; |
314 | time_limit = 5; |
| 315 | absolute_time_limit = |
315 | absolute_time_limit = |
| 316 | time_limit + surplus / 2 + (tc_time_remaining[root_wtm] - |
316 | time_limit + surplus / 2 + (tc_time_remaining[root_wtm] - |
| 317 | tc_safety_margin) / 4; |
317 | tc_safety_margin) / 4; |
| Line 330... | Line 330... | ||
| 330 | * and instant moves. * |
330 | * and instant moves. * |
| 331 | * * |
331 | * * |
| 332 | ************************************************************ |
332 | ************************************************************ |
| 333 | */ |
333 | */ |
| 334 | if (usage_level) |
334 | if (usage_level) |
| 335 | time_limit * |
335 | time_limit = (int) (time_limit * (1.0 + usage_level / 100.0)); // Pierre-Marie Baty -- added type cast |
| 336 | if (first_nonbook_factor && moves_out_of_book < first_nonbook_span) { |
336 | if (first_nonbook_factor && moves_out_of_book < first_nonbook_span) { |
| 337 | mult = |
337 | mult = |
| 338 | (first_nonbook_span - moves_out_of_book + 1) * first_nonbook_factor; |
338 | (first_nonbook_span - moves_out_of_book + 1) * first_nonbook_factor; |
| 339 | extra = time_limit * mult / first_nonbook_span / 100; |
339 | extra = time_limit * mult / first_nonbook_span / 100; |
| 340 | time_limit += extra; |
340 | time_limit += extra; |